ReactOS 0.4.15-dev-7961-gdcf9eb0
ke.h File Reference

Go to the source code of this file.

Classes

struct  _CONTEXT
 
struct  _KPCR
 

Macros

#define PASSIVE_LEVEL   0
 
#define LOW_LEVEL   0
 
#define APC_LEVEL   1
 
#define DISPATCH_LEVEL   2
 
#define CLOCK_LEVEL   13
 
#define IPI_LEVEL   14
 
#define DRS_LEVEL   14
 
#define POWER_LEVEL   14
 
#define PROFILE_LEVEL   15
 
#define HIGH_LEVEL   15
 
#define KIP0PCRADDRESS   0xFFDFF000
 
#define KI_USER_SHARED_DATA   0xFFFF9000
 
#define SharedUserData   ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA)
 
#define PAGE_SIZE   0x1000
 
#define PAGE_SHIFT   12L
 
#define MemoryBarrier()   __dmb(_ARM_BARRIER_SY)
 
#define PreFetchCacheLine(l, a)   __prefetch((const void *) (a))
 
#define PrefetchForWrite(p)   __prefetch((const void *) (p))
 
#define ReadForWriteAccess(p)   (*(p))
 
#define KeMemoryBarrierWithoutFence()   _ReadWriteBarrier()
 
#define KeLowerIrql(a)   KfLowerIrql(a)
 
#define KeRaiseIrql(a, b)   *(b) = KfRaiseIrql(a)
 
#define KeAcquireSpinLock(a, b)   *(b) = KfAcquireSpinLock(a)
 
#define KeReleaseSpinLock(a, b)   KfReleaseSpinLock(a,b)
 
#define KeAcquireSpinLockAtDpcLevel(SpinLock)   KefAcquireSpinLockAtDpcLevel(SpinLock)
 
#define KeReleaseSpinLockFromDpcLevel(SpinLock)   KefReleaseSpinLockFromDpcLevel(SpinLock)
 
#define DbgRaiseAssertionFailure()   __emit(0xdefc)
 
#define KeQueryTickCount(CurrentCount)   _KeQueryTickCount(CurrentCount)
 
#define CP15_PMSELR   15, 0, 9, 12, 5 /* Event Counter Selection Register */
 
#define CP15_PMXEVCNTR   15, 0, 9, 13, 2 /* Event Count Register */
 
#define CP15_TPIDRURW   15, 0, 13, 0, 2 /* Software Thread ID Register, UsRW */
 
#define CP15_TPIDRURO   15, 0, 13, 0, 3 /* Software Thread ID Register, UsRO */
 
#define CP15_TPIDRPRW   15, 0, 13, 0, 4 /* Software Thread ID Register, Kernel */
 
#define PAUSE_PROCESSOR   __yield();
 
#define KERNEL_STACK_SIZE   0x3000
 
#define KERNEL_LARGE_STACK_SIZE   0xF000
 
#define KERNEL_LARGE_STACK_COMMIT   KERNEL_STACK_SIZE
 
#define KERNEL_MCA_EXCEPTION_STACK_SIZE   0x2000
 
#define EXCEPTION_READ_FAULT   0
 
#define EXCEPTION_WRITE_FAULT   1
 
#define EXCEPTION_EXECUTE_FAULT   8
 
#define CONTEXT_ARM   0x200000L
 
#define CONTEXT_CONTROL   (CONTEXT_ARM | 0x00000001L)
 
#define CONTEXT_INTEGER   (CONTEXT_ARM | 0x00000002L)
 
#define CONTEXT_FLOATING_POINT   (CONTEXT_ARM | 0x00000004L)
 
#define CONTEXT_DEBUG_REGISTERS   (CONTEXT_ARM | 0x00000008L)
 
#define CONTEXT_FULL   (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
 
#define ARM_MAX_BREAKPOINTS   8
 
#define ARM_MAX_WATCHPOINTS   1
 
#define PCR_MINOR_VERSION   1
 
#define PCR_MAJOR_VERSION   1
 
#define CP15_PCR_RESERVED_MASK   0xFFF
 
#define KIPCR()   (((ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK)
 

Typedefs

typedef struct _CONTEXT CONTEXT
 
typedef struct _KPCR KPCR
 
typedef struct _KPCRPKPCR
 

Functions

 $if (_WDMDDK_) typedef struct _KFLOATING_SAVE
 
FORCEINLINE VOID YieldProcessor (VOID)
 
FORCEINLINE VOID KeMemoryBarrier (VOID)
 
 _IRQL_requires_max_ (HIGH_LEVEL) _IRQL_saves_ NTHALAPI KIRQL NTAPI KeGetCurrentIrql(VOID)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) _IRQL_saves_ _IRQL_raises_(DISPATCH_LEVEL) NTHALAPI KIRQL NTAPI KeRaiseIrqlToDpcLevel(VOID)
 
NTHALAPI KIRQL NTAPI KeRaiseIrqlToSynchLevel (VOID)
 
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _IRQL_requires_ (DISPATCH_LEVEL) NTHALAPI VOID FASTCALL KfReleaseSpinLock(_Inout_ PKSPIN_LOCK SpinLock
 
_Requires_lock_not_held_ SpinLock _Acquires_lock_ SpinLock _IRQL_requires_min_ (DISPATCH_LEVEL) NTKERNELAPI VOID FASTCALL KefAcquireSpinLockAtDpcLevel(_Inout_ PKSPIN_LOCK SpinLock)
 
NTSYSAPI PKTHREAD NTAPI KeGetCurrentThread (VOID)
 
 _Always_ (_Post_satisfies_(return<=0)) _Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) _Kernel_float_saved_ _At_(*FloatSave
 
 _Kernel_requires_resource_not_held_ (FloatState) _Kernel_acquires_resource_(FloatState)) FORCEINLINE NTSTATUS KeSaveFloatingPointState(_Out_ PKFLOATING_SAVE FloatSave)
 
 _Success_ (1) _Kernel_float_restored_ _At_(*FloatSave
 
 _Kernel_requires_resource_held_ (FloatState) _Kernel_releases_resource_(FloatState)) FORCEINLINE NTSTATUS KeRestoreFloatingPointState(_In_ PKFLOATING_SAVE FloatSave)
 
VOID KeFlushIoBuffers (_In_ PMDL Mdl, _In_ BOOLEAN ReadOperation, _In_ BOOLEAN DmaOperation)
 
FORCEINLINE VOID _KeQueryTickCount (OUT PLARGE_INTEGER CurrentCount)
 
 $endif (_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128 == *HashTable
 
FORCEINLINE PKPCR KeGetPcr (VOID)
 
FORCEINLINE ULONG KeGetCurrentProcessorNumber (VOID)
 

Variables

 KFLOATING_SAVE
 
PKFLOATING_SAVE
 
NTKERNELAPI volatile KSYSTEM_TIME KeTickCount
 
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _In_ _IRQL_restores_ KIRQL NewIrql
 
 NEON128
 
PNEON128
 

Macro Definition Documentation

◆ APC_LEVEL

#define APC_LEVEL   1

◆ ARM_MAX_BREAKPOINTS

#define ARM_MAX_BREAKPOINTS   8

Definition at line 231 of file ke.h.

◆ ARM_MAX_WATCHPOINTS

#define ARM_MAX_WATCHPOINTS   1

Definition at line 232 of file ke.h.

◆ CLOCK_LEVEL

#define CLOCK_LEVEL   13

◆ CONTEXT_ARM

#define CONTEXT_ARM   0x200000L

◆ CONTEXT_CONTROL

#define CONTEXT_CONTROL   (CONTEXT_ARM | 0x00000001L)

◆ CONTEXT_DEBUG_REGISTERS

#define CONTEXT_DEBUG_REGISTERS   (CONTEXT_ARM | 0x00000008L)

◆ CONTEXT_FLOATING_POINT

#define CONTEXT_FLOATING_POINT   (CONTEXT_ARM | 0x00000004L)

◆ CONTEXT_FULL

◆ CONTEXT_INTEGER

#define CONTEXT_INTEGER   (CONTEXT_ARM | 0x00000002L)

◆ CP15_PCR_RESERVED_MASK

#define CP15_PCR_RESERVED_MASK   0xFFF

Definition at line 336 of file ke.h.

◆ CP15_PMSELR

#define CP15_PMSELR   15, 0, 9, 12, 5 /* Event Counter Selection Register */

Definition at line 196 of file ke.h.

◆ CP15_PMXEVCNTR

#define CP15_PMXEVCNTR   15, 0, 9, 13, 2 /* Event Count Register */

Definition at line 197 of file ke.h.

◆ CP15_TPIDRPRW

#define CP15_TPIDRPRW   15, 0, 13, 0, 4 /* Software Thread ID Register, Kernel */

Definition at line 200 of file ke.h.

◆ CP15_TPIDRURO

#define CP15_TPIDRURO   15, 0, 13, 0, 3 /* Software Thread ID Register, UsRO */

Definition at line 199 of file ke.h.

◆ CP15_TPIDRURW

#define CP15_TPIDRURW   15, 0, 13, 0, 2 /* Software Thread ID Register, UsRW */

Definition at line 198 of file ke.h.

◆ DbgRaiseAssertionFailure

#define DbgRaiseAssertionFailure ( )    __emit(0xdefc)

Definition at line 174 of file ke.h.

◆ DISPATCH_LEVEL

#define DISPATCH_LEVEL   2

◆ DRS_LEVEL

#define DRS_LEVEL   14

◆ EXCEPTION_EXECUTE_FAULT

#define EXCEPTION_EXECUTE_FAULT   8

◆ EXCEPTION_READ_FAULT

#define EXCEPTION_READ_FAULT   0

◆ EXCEPTION_WRITE_FAULT

#define EXCEPTION_WRITE_FAULT   1

◆ HIGH_LEVEL

#define HIGH_LEVEL   15

◆ IPI_LEVEL

#define IPI_LEVEL   14

◆ KeAcquireSpinLock

#define KeAcquireSpinLock (   a,
  b 
)    *(b) = KfAcquireSpinLock(a)

Definition at line 104 of file ke.h.

◆ KeAcquireSpinLockAtDpcLevel

#define KeAcquireSpinLockAtDpcLevel (   SpinLock)    KefAcquireSpinLockAtDpcLevel(SpinLock)

Definition at line 125 of file ke.h.

◆ KeLowerIrql

#define KeLowerIrql (   a)    KfLowerIrql(a)

Definition at line 69 of file ke.h.

◆ KeMemoryBarrierWithoutFence

#define KeMemoryBarrierWithoutFence ( )    _ReadWriteBarrier()

Definition at line 53 of file ke.h.

◆ KeQueryTickCount

#define KeQueryTickCount (   CurrentCount)    _KeQueryTickCount(CurrentCount)

Definition at line 194 of file ke.h.

◆ KeRaiseIrql

#define KeRaiseIrql (   a,
  b 
)    *(b) = KfRaiseIrql(a)

Definition at line 79 of file ke.h.

◆ KeReleaseSpinLock

#define KeReleaseSpinLock (   a,
  b 
)    KfReleaseSpinLock(a,b)

Definition at line 115 of file ke.h.

◆ KeReleaseSpinLockFromDpcLevel

#define KeReleaseSpinLockFromDpcLevel (   SpinLock)    KefReleaseSpinLockFromDpcLevel(SpinLock)

Definition at line 135 of file ke.h.

◆ KERNEL_LARGE_STACK_COMMIT

#define KERNEL_LARGE_STACK_COMMIT   KERNEL_STACK_SIZE

◆ KERNEL_LARGE_STACK_SIZE

#define KERNEL_LARGE_STACK_SIZE   0xF000

◆ KERNEL_MCA_EXCEPTION_STACK_SIZE

#define KERNEL_MCA_EXCEPTION_STACK_SIZE   0x2000

◆ KERNEL_STACK_SIZE

#define KERNEL_STACK_SIZE   0x3000

◆ KI_USER_SHARED_DATA

#define KI_USER_SHARED_DATA   0xFFFF9000

◆ KIP0PCRADDRESS

#define KIP0PCRADDRESS   0xFFDFF000

◆ KIPCR

#define KIPCR ( )    (((ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK)

Definition at line 337 of file ke.h.

◆ LOW_LEVEL

#define LOW_LEVEL   0

◆ MemoryBarrier

#define MemoryBarrier ( )    __dmb(_ARM_BARRIER_SY)

Definition at line 39 of file ke.h.

◆ PAGE_SHIFT

#define PAGE_SHIFT   12L

◆ PAGE_SIZE

#define PAGE_SIZE   0x1000

◆ PASSIVE_LEVEL

#define PASSIVE_LEVEL   0

◆ PAUSE_PROCESSOR

#define PAUSE_PROCESSOR   __yield();

◆ PCR_MAJOR_VERSION

#define PCR_MAJOR_VERSION   1

Definition at line 294 of file ke.h.

◆ PCR_MINOR_VERSION

#define PCR_MINOR_VERSION   1

Definition at line 293 of file ke.h.

◆ POWER_LEVEL

#define POWER_LEVEL   14

◆ PreFetchCacheLine

#define PreFetchCacheLine (   l,
  a 
)    __prefetch((const void *) (a))

Definition at line 40 of file ke.h.

◆ PrefetchForWrite

#define PrefetchForWrite (   p)    __prefetch((const void *) (p))

Definition at line 41 of file ke.h.

◆ PROFILE_LEVEL

#define PROFILE_LEVEL   15

◆ ReadForWriteAccess

#define ReadForWriteAccess (   p)    (*(p))

Definition at line 42 of file ke.h.

◆ SharedUserData

Typedef Documentation

◆ CONTEXT

◆ KPCR

typedef struct _KPCR KPCR

◆ PKPCR

typedef struct _KPCR * PKPCR

Function Documentation

◆ $endif()

$endif ( _WDMDDK_  ) == *HashTable

Definition at line 202 of file ke.h.

226{
229} NEON128, *PNEON128;
NEON128
Definition: ke.h:229
* PNEON128
Definition: ke.h:229
@ High
Definition: strmini.h:378
@ Low
Definition: strmini.h:380
int64_t LONGLONG
Definition: typedefs.h:68
uint64_t ULONGLONG
Definition: typedefs.h:67

◆ $if()

$if ( _WDMDDK_  )

Kernel definitions for ARM

Definition at line 1 of file ke.h.

24{
KFLOATING_SAVE
Definition: ke.h:33
* PKFLOATING_SAVE
Definition: ke.h:33
uint32_t ULONG
Definition: typedefs.h:59
_Reserved_ PVOID Reserved
Definition: winddi.h:3974

◆ _Always_()

_Always_ ( _Post_satisfies_(return<=0)  )

◆ _IRQL_requires_()

Definition at line 394 of file expool.c.

1465{
1466 SIZE_T OldSize = PoolBigPageTableSize;
1467 SIZE_T NewSize, NewSizeInBytes;
1468 PPOOL_TRACKER_BIG_PAGES NewTable;
1469 PPOOL_TRACKER_BIG_PAGES OldTable;
1470 ULONG i;
1471 ULONG PagesFreed;
1472 ULONG Hash;
1473 ULONG HashMask;
1474
1475 /* Must be holding ExpLargePoolTableLock */
1477
1478 /* Make sure we don't overflow */
1479 if (Shrink)
1480 {
1481 NewSize = OldSize / 2;
1482
1483 /* Make sure we don't shrink too much. */
1485
1487 ASSERT(NewSize <= OldSize);
1488
1489 /* If there is only one page left, then keep it around. Not a failure either. */
1490 if (NewSize == OldSize)
1491 {
1494 return TRUE;
1495 }
1496 }
1497 else
1498 {
1499 if (!NT_SUCCESS(RtlSIZETMult(2, OldSize, &NewSize)))
1500 {
1501 DPRINT1("Overflow expanding big page table. Size=%lu\n", OldSize);
1503 return FALSE;
1504 }
1505
1506 /* Make sure we don't stupidly waste pages */
1508 ASSERT(NewSize > OldSize);
1509 }
1510
1511 if (!NT_SUCCESS(RtlSIZETMult(sizeof(POOL_TRACKER_BIG_PAGES), NewSize, &NewSizeInBytes)))
1512 {
1513 DPRINT1("Overflow while calculating big page table size. Size=%lu\n", OldSize);
1515 return FALSE;
1516 }
1517
1518 NewTable = MiAllocatePoolPages(NonPagedPool, NewSizeInBytes);
1519 if (NewTable == NULL)
1520 {
1521 DPRINT("Could not allocate %lu bytes for new big page table\n", NewSizeInBytes);
1523 return FALSE;
1524 }
1525
1526 DPRINT("%s big pool tracker table to %lu entries\n", Shrink ? "Shrinking" : "Expanding", NewSize);
1527
1528 /* Initialize the new table */
1529 RtlZeroMemory(NewTable, NewSizeInBytes);
1530 for (i = 0; i < NewSize; i++)
1531 {
1532 NewTable[i].Va = (PVOID)POOL_BIG_TABLE_ENTRY_FREE;
1533 }
1534
1535 /* Copy over all items */
1536 OldTable = PoolBigPageTable;
1537 HashMask = NewSize - 1;
1538 for (i = 0; i < OldSize; i++)
1539 {
1540 /* Skip over empty items */
1541 if ((ULONG_PTR)OldTable[i].Va & POOL_BIG_TABLE_ENTRY_FREE)
1542 {
1543 continue;
1544 }
1545
1546 /* Recalculate the hash due to the new table size */
1547 Hash = ExpComputePartialHashForAddress(OldTable[i].Va) % HashMask;
1548
1549 /* Find the location in the new table */
1550 while (!((ULONG_PTR)NewTable[Hash].Va & POOL_BIG_TABLE_ENTRY_FREE))
1551 {
1552 if (++Hash == NewSize)
1553 Hash = 0;
1554 }
1555
1556 /* We must have space */
1558
1559 /* Finally, copy the item */
1560 NewTable[Hash] = OldTable[i];
1561 }
1562
1563 /* Activate the new table */
1564 PoolBigPageTable = NewTable;
1567
1568 /* Release the lock, we're done changing global state */
1570
1571 /* Free the old table and update our tracker */
1572 PagesFreed = MiFreePoolPages(OldTable);
1573 ExpRemovePoolTracker('looP', PagesFreed << PAGE_SHIFT, 0);
1574 ExpInsertPoolTracker('looP', ALIGN_UP_BY(NewSizeInBytes, PAGE_SIZE), 0);
1575
1576 return TRUE;
1577}
#define ALIGN_DOWN_BY(size, align)
#define ALIGN_UP_BY(size, align)
#define DPRINT1
Definition: precomp.h:8
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static int Hash(const char *)
Definition: reader.c:2257
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define NonPagedPool
Definition: env_spec_w32.h:307
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
ULONG ExpPoolBigEntriesInUse
Definition: expool.c:55
VOID NTAPI ExpRemovePoolTracker(IN ULONG Key, IN SIZE_T NumberOfBytes, IN POOL_TYPE PoolType)
Definition: expool.c:760
SIZE_T PoolBigPageTableSize
Definition: expool.c:47
FORCEINLINE ULONG ExpComputePartialHashForAddress(IN PVOID BaseAddress)
Definition: expool.c:457
PPOOL_TRACKER_BIG_PAGES PoolBigPageTable
Definition: expool.c:50
#define POOL_BIG_TABLE_ENTRY_FREE
Definition: expool.c:23
KSPIN_LOCK ExpLargePoolTableLock
Definition: expool.c:54
VOID NTAPI ExpInsertPoolTracker(IN ULONG Key, IN SIZE_T NumberOfBytes, IN POOL_TYPE PoolType)
Definition: expool.c:851
SIZE_T PoolBigPageTableHash
Definition: expool.c:47
_Must_inspect_result_ _In_ USHORT NewSize
Definition: fltkernel.h:975
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ASSERT(a)
Definition: mode.c:44
PVOID NTAPI MiAllocatePoolPages(IN POOL_TYPE PoolType, IN SIZE_T SizeInBytes)
Definition: pool.c:422
ULONG NTAPI MiFreePoolPages(IN PVOID StartingAddress)
Definition: pool.c:918
#define DPRINT
Definition: sndvol32.h:71
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778

◆ _IRQL_requires_max_() [1/2]

_IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 1705 of file hardware.c.

1709{
1710 SendKey();
1712}
static VOID SendKey(VOID)
Definition: hardware.c:332
static VOID Wake(_In_ UCHAR Csn)
Definition: hardware.c:149
_In_ PISAPNP_LOGICAL_DEVICE LogicalDevice
Definition: isapnp.h:399

◆ _IRQL_requires_max_() [2/2]

_IRQL_requires_max_ ( HIGH_LEVEL  )

Definition at line 134 of file wdfdpc.h.

151{
152 return ((PFN_WDFDPCENQUEUE) WdfFunctions[WdfDpcEnqueueTableIndex])(WdfDriverGlobals, Dpc);
153}
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfDpcEnqueueTableIndex
Definition: wdffuncenum.h:137

◆ _IRQL_requires_min_()

Definition at line 1015 of file mm.h.

1021{
1022 PKSPIN_LOCK_QUEUE LockQueue;
1023
1025 LockQueue = &KeGetCurrentPrcb()->LockQueue[LockQueuePfnLock];
1026 KeAcquireQueuedSpinLockAtDpcLevel(LockQueue);
1027}
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1161
@ LockQueuePfnLock
Definition: ketypes.h:660

◆ _KeQueryTickCount()

FORCEINLINE VOID _KeQueryTickCount ( OUT PLARGE_INTEGER  CurrentCount)

Definition at line 178 of file ke.h.

180{
181 for (;;) {
182#ifdef NONAMELESSUNION
183 CurrentCount->s.HighPart = KeTickCount.High1Time;
184 CurrentCount->s.LowPart = KeTickCount.LowPart;
185 if (CurrentCount->s.HighPart == KeTickCount.High2Time) break;
186#else
187 CurrentCount->HighPart = KeTickCount.High1Time;
188 CurrentCount->LowPart = KeTickCount.LowPart;
189 if (CurrentCount->HighPart == KeTickCount.High2Time) break;
190#endif
192 }
193}
#define YieldProcessor
Definition: ke.h:48
NTKERNELAPI volatile KSYSTEM_TIME KeTickCount
Definition: clock.c:19
LONG High1Time
Definition: ketypes.h:930
LONG High2Time
Definition: ketypes.h:931
ULONG LowPart
Definition: ketypes.h:929

◆ _Kernel_requires_resource_held_()

_Kernel_requires_resource_held_ ( FloatState  )

Definition at line 158 of file ke.h.

163{
164 UNREFERENCED_PARAMETER(FloatSave);
165 return STATUS_SUCCESS;
166}
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _Kernel_requires_resource_not_held_()

_Kernel_requires_resource_not_held_ ( FloatState  )

Definition at line 146 of file ke.h.

151{
152 UNREFERENCED_PARAMETER(FloatSave);
153 return STATUS_SUCCESS;
154}

◆ _Success_()

_Success_ ( )

◆ KeFlushIoBuffers()

VOID KeFlushIoBuffers ( _In_ PMDL  Mdl,
_In_ BOOLEAN  ReadOperation,
_In_ BOOLEAN  DmaOperation 
)

Definition at line 191 of file cpu.c.

195{
197}
NTSYSAPI void WINAPI DbgBreakPoint(void)

◆ KeGetCurrentProcessorNumber()

FORCEINLINE ULONG KeGetCurrentProcessorNumber ( VOID  )

Definition at line 349 of file ke.h.

350{
351 return (ULONG)*((PUCHAR)KIPCR() + 0x580);
352}
#define KIPCR()
Definition: ke.h:337
unsigned char * PUCHAR
Definition: typedefs.h:53

◆ KeGetCurrentThread()

NTSYSAPI PKTHREAD NTAPI KeGetCurrentThread ( VOID  )

Definition at line 379 of file ke.h.

380{
381 /* Return the current thread */
382 return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread;
383}
#define KeGetPcr()
Definition: ketypes.h:81

◆ KeGetPcr()

FORCEINLINE PKPCR KeGetPcr ( VOID  )

Definition at line 341 of file ke.h.

342{
343 return (PKPCR)KIPCR();
344}
Definition: ke.h:294

◆ KeMemoryBarrier()

FORCEINLINE VOID KeMemoryBarrier ( VOID  )

Definition at line 46 of file ke.h.

48{
51}
#define _ReadWriteBarrier()
Definition: intrin_arm.h:36
#define MemoryBarrier()
Definition: ke.h:39

◆ KeRaiseIrqlToSynchLevel()

NTHALAPI KIRQL NTAPI KeRaiseIrqlToSynchLevel ( VOID  )

Definition at line 156 of file pic.c.

157{
158 PKPCR Pcr = KeGetPcr();
159 KIRQL CurrentIrql;
160
161 /* Save and update IRQL */
162 CurrentIrql = Pcr->Irql;
163 Pcr->Irql = SYNCH_LEVEL;
164
165#ifdef IRQL_DEBUG
166 /* Validate correct raise */
167 if (CurrentIrql > SYNCH_LEVEL)
168 {
169 /* Crash system */
170 KeBugCheckEx(IRQL_NOT_GREATER_OR_EQUAL,
171 CurrentIrql,
173 0,
174 1);
175 }
176#endif
177
178 /* Return the previous value */
179 return CurrentIrql;
180}
#define SYNCH_LEVEL
Definition: env_spec_w32.h:704
UCHAR KIRQL
Definition: env_spec_w32.h:591
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
KIRQL Irql
Definition: ke.h:311

◆ YieldProcessor()

FORCEINLINE VOID YieldProcessor ( VOID  )

Definition at line 32 of file ke.h.

34{
36 __yield();
37}
void __dmb(unsigned int Type)
@ _ARM_BARRIER_ISHST
Definition: armintr.h:36
__INTRIN_INLINE void __yield(void)
Definition: intrin_arm.h:38

Variable Documentation

◆ KeTickCount

NTKERNELAPI volatile KSYSTEM_TIME KeTickCount
extern

Definition at line 19 of file clock.c.

◆ KFLOATING_SAVE

Definition at line 26 of file ke.h.

◆ NEON128

Definition at line 229 of file ke.h.

◆ NewIrql

◆ PKFLOATING_SAVE

Definition at line 26 of file ke.h.

◆ PNEON128

Definition at line 229 of file ke.h.