ReactOS 0.4.15-dev-8191-gbc6c731
kefuncs.h
Go to the documentation of this file.
1/*++ NDK Version: 0098
2
3Copyright (c) Alex Ionescu. All rights reserved.
4
5Header Name:
6
7 kefuncs.h
8
9Abstract:
10
11 Functions definitions for the Kernel services.
12
13Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17--*/
18
19#ifndef _KEFUNCS_H
20#define _KEFUNCS_H
21
22//
23// Dependencies
24//
25#include <umtypes.h>
26#include <ketypes.h>
27#include <section_attribs.h>
28
29#ifdef __cplusplus
30extern "C"
31{
32#endif
33
34#ifndef NTOS_MODE_USER
35
36//
37// Affinity helpers
38//
40{
41 ASSERT(Index < sizeof(KAFFINITY) * 8);
42 return (KAFFINITY)1 << Index;
43}
44
46{
47#ifdef _WIN64
48 return BitScanForward64(Index, Mask);
49#else
50 return BitScanForward(Index, Mask);
51#endif
52}
53
55{
56#ifdef _WIN64
57 return BitScanReverse64(Index, Mask);
58#else
59 return BitScanReverse(Index, Mask);
60#endif
61}
62
64{
65 ASSERT(Index < sizeof(KAFFINITY) * 8);
66#ifdef _WIN64
67 return InterlockedBitTestAndSet64((PLONG64)Affinity, Index);
68#else
70#endif
71}
72
74{
75 ASSERT(Index < sizeof(KAFFINITY) * 8);
76#ifdef _WIN64
77 return InterlockedBitTestAndReset64((PLONG64)Affinity, Index);
78#else
80#endif
81}
82
83//
84// APC Functions
85//
86VOID
89 _In_ PKAPC Apc,
91 _In_ KAPC_ENVIRONMENT TargetEnvironment,
92 _In_ PKKERNEL_ROUTINE KernelRoutine,
93 _In_opt_ PKRUNDOWN_ROUTINE RundownRoutine,
94 _In_ PKNORMAL_ROUTINE NormalRoutine,
97);
98
100NTAPI
102 _In_ PKAPC Apc,
106);
107
108VOID
109NTAPI
112#ifdef _M_AMD64
113 _In_ PKEXCEPTION_FRAME ExceptionFrame,
114#else
115 _Reserved_ PKEXCEPTION_FRAME ExceptionFrame,
116#endif
117 _In_ PKTRAP_FRAME TrapFrame
118);
119
120//
121// Process/Thread Functions
122//
123VOID
124NTAPI
127);
128
130NTAPI
132 VOID
133);
134
135VOID
136NTAPI
140);
141
143NTAPI
147);
148
150NTAPI
152 VOID
153);
154
156NTAPI
163);
164
165//
166// Spinlock Functions
167//
168VOID
172);
173
174VOID
178);
179
180KIRQL
184);
185
189 _In_ KSPIN_LOCK_QUEUE_NUMBER LockNumber,
191);
192
193VOID
198);
199
200
201//
202// Interrupt Functions
203//
204VOID
205NTAPI
216 _In_ CHAR ProcessorNumber,
218);
219
221NTAPI
224);
225
227NTAPI
230);
231
232VOID
233NTAPI
235 VOID
236);
237
238VOID
239NTAPI
241 VOID
242);
243
245VOID
248 VOID
249);
250
251VOID
252NTAPI
254 VOID
255);
256
258NTAPI
260 VOID
261);
262
264NTAPI
266 _In_ PKTRAP_FRAME TrapFrame,
267#ifdef _M_AMD64
268 _In_ PKEXCEPTION_FRAME ExceptionFrame
269#else
270 _Reserved_ PKEXCEPTION_FRAME ExceptionFrame
271#endif
272);
273
274//
275// Generic DPC Routines
276//
277VOID
278NTAPI
280 _In_ PKDEFERRED_ROUTINE Routine,
282);
283
284VOID
285NTAPI
288);
289
291NTAPI
294);
295
296//
297// ARC Configuration Functions. Only enabled if you have ARC Support
298//
299#ifdef _ARC_
301NTAPI
306 _In_opt_ PULONG ComponentKey,
308);
309
311NTAPI
316 _In_opt_ PULONG ComponentKey
317);
318#endif
319
320//
321// Low-level Hardware/CPU Control Functions
322//
323VOID
324NTAPI
327 _In_ BOOLEAN AllProcessors
328);
329
330VOID
331NTAPI
333 _In_ ULONG Coherency
334);
335
336VOID
339 _In_ ULONG Value1,
340 _In_ ULONG Value2
341);
342
343VOID
344NTAPI
346 _In_ PKTRAP_FRAME TrapFrame
347);
348
349VOID
350NTAPI
352 _In_ PKTRAP_FRAME TrapFrame,
354);
355
356VOID
357NTAPI
359 _In_ KIRQL ProfileIrql
360);
361
362VOID
363NTAPI
365 _In_ ULONG MaxIncrement,
366 _In_ ULONG MinIncrement
367);
368
370NTAPI
372 _In_ ULONG BiosCommand,
373 _Inout_ PCONTEXT BiosArguments
374);
375
376//
377// Misc. Functions
378//
380NTAPI
382 _In_ ULONG FunctionID,
383 _In_reads_opt_(InputLength) PVOID InputBuffer,
384 _In_ ULONG InputLength,
386 _Out_ PULONG OutputLength
387);
388
390NTAPI
393);
394
395#endif
396
397//
398// Native Calls
399//
402NTAPI
405 _In_ BOOLEAN TestAlert
406);
407
410NTAPI
415);
416
419NTAPI
421 _Out_ PHANDLE ProfileHandle,
423 _In_ PVOID ImageBase,
424 _In_ SIZE_T ImageSize,
425 _In_ ULONG Granularity,
427 _In_ ULONG ProfilingSize,
429 _In_ KAFFINITY ProcessorMask
430);
431
434NTAPI
436 _Out_ PHANDLE ProfileHandle,
438 _In_ PVOID ImageBase,
439 _In_ SIZE_T ImageSize,
440 _In_ ULONG Granularity,
442 _In_ ULONG ProfilingSize,
444 _In_ USHORT GroupCount,
446);
447
450NTAPI
454);
455
456ULONG
457NTAPI
459 VOID
460);
461
464NTAPI
466 _In_ HANDLE ThreadHandle,
468);
469
471ULONG
472NTAPI
474 VOID
475);
476
479NTAPI
481 _In_ KPROFILE_SOURCE ProfileSource,
483);
484
487NTAPI
491);
492
495NTAPI
497 _Out_ PLARGE_INTEGER CurrentTime
498);
499
502NTAPI
504 _Out_ PULONG MinimumResolution,
505 _Out_ PULONG MaximumResolution,
506 _Out_ PULONG ActualResolution
507);
508
511NTAPI
513 _In_ HANDLE ThreadHandle,
515 _In_opt_ PVOID NormalContext,
518);
519
522NTAPI
524 _In_ HANDLE ThreadHandle,
525 _In_opt_ HANDLE UserApcReserveHandle,
527 _In_opt_ PVOID NormalContext,
530);
531
534NTAPI
536 _In_ PEXCEPTION_RECORD ExceptionRecord,
538 _In_ BOOLEAN SearchFrames
539);
540
543NTAPI
545 _In_ HANDLE ThreadHandle,
547);
548
551NTAPI
554 _In_ KPROFILE_SOURCE ClockSource
555);
556
559NTAPI
561 _In_ ULONG Selector1,
562 _In_ LDT_ENTRY LdtEntry1,
563 _In_ ULONG Selector2,
564 _In_ LDT_ENTRY LdtEntry2
565);
566
569NTAPI
571 _In_ PLARGE_INTEGER SystemTime,
572 _In_opt_ PLARGE_INTEGER NewSystemTime
573);
574
577NTAPI
579 _In_ ULONG RequestedResolution,
580 _In_ BOOLEAN SetOrUnset,
581 _Out_ PULONG ActualResolution
582);
583
586NTAPI
588 _In_ HANDLE ProfileHandle
589);
590
593NTAPI
595 _In_ HANDLE ProfileHandle
596);
597
600NTAPI
602 VOID
603);
604
607NTAPI
610 _In_ PVOID ControlData
611);
612
615NTAPI
617 _In_ ULONG RoutineIndex,
618 _In_ PVOID Argument,
619 _In_ ULONG ArgumentLength,
622);
623
626NTAPI
628 VOID
629);
630
633NTAPI
636 _In_ BOOLEAN TestAlert
637);
638
641NTAPI
646);
647
650NTAPI
652 _Out_ PHANDLE ProfileHandle,
654 _In_ PVOID ImageBase,
655 _In_ ULONG ImageSize,
656 _In_ ULONG Granularity,
658 _In_ ULONG ProfilingSize,
660 _In_ KAFFINITY ProcessorMask
661);
662
665NTAPI
669);
670
673NTAPI
677 _In_ ULONG NumberOfBytesToFlush
678);
679
682NTAPI
684 _In_ HANDLE ThreadHandle,
686);
687
689ULONG
690NTAPI
692 VOID
693);
694
697NTAPI
699 _In_ KPROFILE_SOURCE ProfileSource,
701);
702
705NTAPI
709);
710
713NTAPI
715 _Out_ PLARGE_INTEGER CurrentTime
716);
717
720NTAPI
722 _Out_ PULONG MinimumResolution,
723 _Out_ PULONG MaximumResolution,
724 _Out_ PULONG ActualResolution
725);
726
729NTAPI
731 _In_ HANDLE ThreadHandle,
733 _In_opt_ PVOID NormalContext,
736);
737
740NTAPI
742 _In_ PEXCEPTION_RECORD ExceptionRecord,
744 _In_ BOOLEAN SearchFrames
745);
746
749NTAPI
751 _In_ HANDLE ThreadHandle,
753);
754
757NTAPI
760 _In_ KPROFILE_SOURCE ClockSource
761);
762
765NTAPI
767 _In_ ULONG Selector1,
768 _In_ LDT_ENTRY LdtEntry1,
769 _In_ ULONG Selector2,
770 _In_ LDT_ENTRY LdtEntry2
771);
772
775NTAPI
777 _In_ PLARGE_INTEGER SystemTime,
778 _In_opt_ PLARGE_INTEGER NewSystemTime
779);
780
783NTAPI
785 _In_ ULONG RequestedResolution,
786 _In_ BOOLEAN SetOrUnset,
787 _Out_ PULONG ActualResolution
788);
789
792NTAPI
794 _In_ HANDLE ProfileHandle
795);
796
799NTAPI
801 _In_ HANDLE ProfileHandle
802);
803
806NTAPI
808 VOID
809);
810
813NTAPI
816 _In_ PVOID ControlData
817);
818
821NTAPI
823 _In_ ULONG RoutineIndex,
824 _In_ PVOID Argument,
825 _In_ ULONG ArgumentLength,
828);
829
832NTAPI
834 VOID
835);
836#endif
837
838#ifdef __cplusplus
839} // extern "C"
840#endif
unsigned char BOOLEAN
Type
Definition: Type.h:7
#define __cdecl
Definition: accygwin.h:79
@ Invalid
Definition: asmpp.cpp:30
LONG NTSTATUS
Definition: precomp.h:26
__int64 * PLONG64
Definition: basetsd.h:183
#define NTSYSAPI
Definition: ntoskrnl.h:12
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
Definition: cdprocs.h:1774
Definition: bufpool.h:45
_Out_ PKIRQL Irql
Definition: csq.h:179
ULONG_PTR KAFFINITY
Definition: compat.h:85
LONG KPRIORITY
Definition: compat.h:803
UCHAR KIRQL
Definition: env_spec_w32.h:591
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
Definition: CrNtStubs.h:46
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
unsigned int Mask
Definition: fpcontrol.c:82
Status
Definition: gdiplustypes.h:25
_In_ ULONG Mode
Definition: hubbusif.h:303
NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void)
Definition: sysinfo.c:3055
NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void)
Definition: thrdschd.c:744
enum _KPROFILE_SOURCE KPROFILE_SOURCE
#define BitScanReverse
Definition: interlocked.h:6
#define InterlockedBitTestAndSet
Definition: interlocked.h:30
#define BitScanForward
Definition: interlocked.h:5
#define InterlockedBitTestAndReset
Definition: interlocked.h:35
#define ASSERT(a)
Definition: mode.c:44
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_reads_opt_(size)
Definition: ms_sal.h:320
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Outptr_result_buffer_(size)
Definition: ms_sal.h:456
#define _Reserved_
Definition: ms_sal.h:295
#define _In_reads_(size)
Definition: ms_sal.h:319
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ PVOID _In_ BOOLEAN Alertable
Definition: exfuncs.h:453
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE ApcRoutine
Definition: iofuncs.h:726
NTSYSAPI NTSTATUS NTAPI ZwTestAlert(VOID)
NTSYSAPI NTSTATUS NTAPI ZwSetLdtEntries(_In_ ULONG Selector1, _In_ LDT_ENTRY LdtEntry1, _In_ ULONG Selector2, _In_ LDT_ENTRY LdtEntry2)
NTSYSAPI ULONG NTAPI ZwGetTickCount(VOID)
NTSYSAPI NTSTATUS NTAPI ZwStartProfile(_In_ HANDLE ProfileHandle)
NTSYSCALLAPI NTSTATUS NTAPI NtQueueApcThread(_In_ HANDLE ThreadHandle, _In_ PKNORMAL_ROUTINE ApcRoutine, _In_opt_ PVOID NormalContext, _In_opt_ PVOID SystemArgument1, _In_opt_ PVOID SystemArgument2)
VOID NTAPI KeSetTimeIncrement(_In_ ULONG MaxIncrement, _In_ ULONG MinIncrement)
VOID NTAPI KeProfileInterrupt(_In_ PKTRAP_FRAME TrapFrame)
NTSYSCALLAPI NTSTATUS NTAPI NtQueryPerformanceCounter(_Out_ PLARGE_INTEGER Counter, _Out_opt_ PLARGE_INTEGER Frequency)
VOID NTAPI KeSignalCallDpcDone(_In_ PVOID SystemArgument1)
VOID NTAPI KeSetEventBoostPriority(_In_ PKEVENT Event, _In_opt_ PKTHREAD *Thread)
NTSYSAPI NTSTATUS NTAPI ZwFlushInstructionCache(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ ULONG NumberOfBytesToFlush)
NTSYSCALLAPI NTSTATUS NTAPI NtRaiseException(_In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PCONTEXT Context, _In_ BOOLEAN SearchFrames)
Definition: except.c:173
NTSYSAPI NTSTATUS NTAPI ZwContinue(_In_ PCONTEXT Context, _In_ BOOLEAN TestAlert)
VOID NTAPI KiDeliverApc(_In_ KPROCESSOR_MODE PreviousMode, _Reserved_ PKEXCEPTION_FRAME ExceptionFrame, _In_ PKTRAP_FRAME TrapFrame)
NTSYSAPI NTSTATUS NTAPI ZwCallbackReturn(_In_ PVOID Result, _In_ ULONG ResultLength, _In_ NTSTATUS Status)
VOID FASTCALL KiAcquireSpinLock(_Inout_ PKSPIN_LOCK SpinLock)
BOOLEAN NTAPI KeIsAttachedProcess(VOID)
Definition: procobj.c:693
BOOLEAN NTAPI KeAddSystemServiceTable(_In_ PULONG_PTR Base, _In_opt_ PULONG Count, _In_ ULONG Limit, _In_ PUCHAR Number, _In_ ULONG Index)
VOID NTAPI KeProfileInterruptWithSource(_In_ PKTRAP_FRAME TrapFrame, _In_ KPROFILE_SOURCE Source)
VOID KeSetGdtSelector(_In_ ULONG Entry, _In_ ULONG Value1, _In_ ULONG Value2)
NTSYSAPI NTSTATUS NTAPI ZwVdmControl(_In_ ULONG ControlCode, _In_ PVOID ControlData)
FORCEINLINE KAFFINITY AFFINITY_MASK(ULONG Index)
Definition: kefuncs.h:39
FORCEINLINE BOOLEAN BitScanForwardAffinity(PULONG Index, KAFFINITY Mask)
Definition: kefuncs.h:45
VOID NTAPI KeInitializeApc(_In_ PKAPC Apc, _In_ PKTHREAD Thread, _In_ KAPC_ENVIRONMENT TargetEnvironment, _In_ PKKERNEL_ROUTINE KernelRoutine, _In_opt_ PKRUNDOWN_ROUTINE RundownRoutine, _In_ PKNORMAL_ROUTINE NormalRoutine, _In_ KPROCESSOR_MODE Mode, _In_ PVOID Context)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateProfileEx(_Out_ PHANDLE ProfileHandle, _In_ HANDLE ProcessHandle, _In_ PVOID ImageBase, _In_ SIZE_T ImageSize, _In_ ULONG Granularity, _Out_ PVOID Buffer, _In_ ULONG ProfilingSize, _In_ KPROFILE_SOURCE Source, _In_ USHORT GroupCount, _In_reads_(GroupCount) PGROUP_AFFINITY Affinity)
NTSYSAPI NTSTATUS NTAPI ZwYieldExecution(VOID)
NTSYSCALLAPI NTSTATUS NTAPI NtQueueApcThreadEx(_In_ HANDLE ThreadHandle, _In_opt_ HANDLE UserApcReserveHandle, _In_ PKNORMAL_ROUTINE ApcRoutine, _In_opt_ PVOID NormalContext, _In_opt_ PVOID SystemArgument1, _In_opt_ PVOID SystemArgument2)
NTSYSCALLAPI NTSTATUS NTAPI NtVdmControl(_In_ ULONG ControlCode, _In_ PVOID ControlData)
NTSYSCALLAPI NTSTATUS NTAPI NtSetLdtEntries(_In_ ULONG Selector1, _In_ LDT_ENTRY LdtEntry1, _In_ ULONG Selector2, _In_ LDT_ENTRY LdtEntry2)
BOOLEAN NTAPI KeConnectInterrupt(_Inout_ PKINTERRUPT InterruptObject)
VOID NTAPI KeFlushEntireTb(_In_ BOOLEAN Invalid, _In_ BOOLEAN AllProcessors)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateProfile(_Out_ PHANDLE ProfileHandle, _In_ HANDLE ProcessHandle, _In_ PVOID ImageBase, _In_ SIZE_T ImageSize, _In_ ULONG Granularity, _Out_ PVOID Buffer, _In_ ULONG ProfilingSize, _In_ KPROFILE_SOURCE Source, _In_ KAFFINITY ProcessorMask)
NTSYSAPI NTSTATUS NTAPI ZwQueryPerformanceCounter(_Out_ PLARGE_INTEGER Counter, _Out_opt_ PLARGE_INTEGER Frequency)
BOOLEAN FASTCALL KeTryToAcquireQueuedSpinLockRaiseToSynch(_In_ KSPIN_LOCK_QUEUE_NUMBER LockNumber, _In_ PKIRQL OldIrql)
KAFFINITY NTAPI KeSetAffinityThread(_Inout_ PKTHREAD Thread, _In_ KAFFINITY Affinity)
NTSYSAPI NTSTATUS NTAPI ZwStopProfile(_In_ HANDLE ProfileHandle)
NTSYSCALLAPI NTSTATUS NTAPI NtTestAlert(VOID)
Definition: state.c:465
VOID NTAPI KeEnterKernelDebugger(VOID)
Definition: bug.c:1441
VOID NTAPI KiCoprocessorError(VOID)
Definition: cpu.c:1321
NTSTATUS NTAPI KeUserModeCallback(_In_ ULONG FunctionID, _In_reads_opt_(InputLength) PVOID InputBuffer, _In_ ULONG InputLength, _Outptr_result_buffer_(*OutputLength) PVOID *OutputBuffer, _Out_ PULONG OutputLength)
NTSYSAPI NTSTATUS NTAPI ZwQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
NTSYSCALLAPI NTSTATUS NTAPI NtSetTimerResolution(_In_ ULONG RequestedResolution, _In_ BOOLEAN SetOrUnset, _Out_ PULONG ActualResolution)
NTSYSAPI NTSTATUS NTAPI ZwQueryTimerResolution(_Out_ PULONG MinimumResolution, _Out_ PULONG MaximumResolution, _Out_ PULONG ActualResolution)
NTSYSCALLAPI NTSTATUS NTAPI NtSetIntervalProfile(_In_ ULONG Interval, _In_ KPROFILE_SOURCE ClockSource)
NTSTATUS NTAPI Ke386CallBios(_In_ ULONG BiosCommand, _Inout_ PCONTEXT BiosArguments)
BOOLEAN NTAPI KiIpiServiceRoutine(_In_ PKTRAP_FRAME TrapFrame, _Reserved_ PKEXCEPTION_FRAME ExceptionFrame)
FORCEINLINE BOOLEAN InterlockedBitTestAndResetAffinity(volatile KAFFINITY *Affinity, ULONG Index)
Definition: kefuncs.h:73
VOID FASTCALL KeAcquireInStackQueuedSpinLockRaiseToSynch(_In_ PKSPIN_LOCK SpinLock, _In_ PKLOCK_QUEUE_HANDLE LockHandle)
NTSYSAPI NTSTATUS NTAPI ZwSetTimerResolution(_In_ ULONG RequestedResolution, _In_ BOOLEAN SetOrUnset, _Out_ PULONG ActualResolution)
NTSYSCALLAPI NTSTATUS NTAPI NtSetContextThread(_In_ HANDLE ThreadHandle, _In_ PCONTEXT Context)
NTSYSAPI NTSTATUS NTAPI ZwSetSystemTime(_In_ PLARGE_INTEGER SystemTime, _In_opt_ PLARGE_INTEGER NewSystemTime)
NTSYSCALLAPI NTSTATUS NTAPI NtStartProfile(_In_ HANDLE ProfileHandle)
BOOLEAN NTAPI KeDisconnectInterrupt(_Inout_ PKINTERRUPT InterruptObject)
NTSYSCALLAPI NTSTATUS NTAPI NtDelayExecution(_In_ BOOLEAN Alertable, _In_ LARGE_INTEGER *Interval)
NTSYSCALLAPI NTSTATUS NTAPI NtStopProfile(_In_ HANDLE ProfileHandle)
VOID NTAPI KiDispatchInterrupt(VOID)
Definition: thrdini.c:305
NTSYSAPI NTSTATUS NTAPI ZwRaiseException(_In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PCONTEXT Context, _In_ BOOLEAN SearchFrames)
BOOLEAN NTAPI KeInsertQueueApc(_In_ PKAPC Apc, _In_ PVOID SystemArgument1, _In_ PVOID SystemArgument2, _In_ KPRIORITY PriorityBoost)
DECLSPEC_NORETURN VOID __cdecl KiUnexpectedInterrupt(VOID)
Definition: interrupt.c:51
NTSYSCALLAPI NTSTATUS NTAPI NtGetContextThread(_In_ HANDLE ThreadHandle, _Out_ PCONTEXT Context)
NTSYSAPI NTSTATUS NTAPI ZwW32Call(_In_ ULONG RoutineIndex, _In_ PVOID Argument, _In_ ULONG ArgumentLength, _Out_opt_ PVOID *Result, _Out_opt_ PULONG ResultLength)
NTSYSCALLAPI NTSTATUS NTAPI NtContinue(_In_ PCONTEXT Context, _In_ BOOLEAN TestAlert)
Definition: except.c:216
VOID NTAPI KeInitializeInterrupt(_Out_ PKINTERRUPT InterruptObject, _In_ PKSERVICE_ROUTINE ServiceRoutine, _In_ PVOID ServiceContext, _In_ PKSPIN_LOCK SpinLock, _In_ ULONG Vector, _In_ KIRQL Irql, _In_ KIRQL SynchronizeIrql, _In_ KINTERRUPT_MODE InterruptMode, _In_ BOOLEAN ShareVector, _In_ CHAR ProcessorNumber, _In_ BOOLEAN FloatingSave)
NTSYSAPI NTSTATUS NTAPI ZwCreateProfile(_Out_ PHANDLE ProfileHandle, _In_ HANDLE ProcessHandle, _In_ PVOID ImageBase, _In_ ULONG ImageSize, _In_ ULONG Granularity, _Out_ PVOID Buffer, _In_ ULONG ProfilingSize, _In_ KPROFILE_SOURCE Source, _In_ KAFFINITY ProcessorMask)
NTSTATUS NTAPI KeRaiseUserException(_In_ NTSTATUS ExceptionCode)
Definition: exp.c:266
NTSYSAPI NTSTATUS NTAPI ZwSetContextThread(_In_ HANDLE ThreadHandle, _In_ PCONTEXT Context)
NTSYSAPI NTSTATUS NTAPI ZwSetIntervalProfile(_In_ ULONG Interval, _In_ KPROFILE_SOURCE ClockSource)
VOID FASTCALL KiReleaseSpinLock(_Inout_ PKSPIN_LOCK SpinLock)
NTSYSCALLAPI NTSTATUS NTAPI NtQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
PKPROCESS NTAPI KeGetCurrentProcess(VOID)
VOID NTAPI KeGenericCallDpc(_In_ PKDEFERRED_ROUTINE Routine, _In_ PVOID Context)
NTSYSAPI NTSTATUS NTAPI ZwDelayExecution(_In_ BOOLEAN Alertable, _In_ LARGE_INTEGER *Interval)
KIRQL FASTCALL KeAcquireQueuedSpinLockRaiseToSynch(_In_ KSPIN_LOCK_QUEUE_NUMBER LockNumber)
NTSYSCALLAPI NTSTATUS NTAPI NtW32Call(_In_ ULONG RoutineIndex, _In_ PVOID Argument, _In_ ULONG ArgumentLength, _Out_opt_ PVOID *Result, _Out_opt_ PULONG ResultLength)
NTSYSAPI NTSTATUS NTAPI ZwQueueApcThread(_In_ HANDLE ThreadHandle, _In_ PKNORMAL_ROUTINE ApcRoutine, _In_opt_ PVOID NormalContext, _In_opt_ PVOID SystemArgument1, _In_opt_ PVOID SystemArgument2)
FORCEINLINE BOOLEAN BitScanReverseAffinity(PULONG Index, KAFFINITY Mask)
Definition: kefuncs.h:54
VOID NTAPI KeSetProfileIrql(_In_ KIRQL ProfileIrql)
NTSYSCALLAPI NTSTATUS NTAPI NtSetSystemTime(_In_ PLARGE_INTEGER SystemTime, _In_opt_ PLARGE_INTEGER NewSystemTime)
FORCEINLINE BOOLEAN InterlockedBitTestAndSetAffinity(volatile KAFFINITY *Affinity, ULONG Index)
Definition: kefuncs.h:63
NTSYSAPI NTSTATUS NTAPI ZwQueryIntervalProfile(_In_ KPROFILE_SOURCE ProfileSource, _Out_ PULONG Interval)
NTSYSAPI NTSTATUS NTAPI ZwGetContextThread(_In_ HANDLE ThreadHandle, _Out_ PCONTEXT Context)
NTSYSCALLAPI NTSTATUS NTAPI NtQueryIntervalProfile(_In_ KPROFILE_SOURCE ProfileSource, _Out_ PULONG Interval)
BOOLEAN NTAPI KeSignalCallDpcSynchronize(_In_ PVOID SystemArgument2)
BOOLEAN NTAPI KeIsExecutingDpc(VOID)
Definition: dpc.c:947
VOID NTAPI KeTerminateThread(_In_ KPRIORITY Increment)
NTSYSCALLAPI NTSTATUS NTAPI NtQueryTimerResolution(_Out_ PULONG MinimumResolution, _Out_ PULONG MaximumResolution, _Out_ PULONG ActualResolution)
VOID NTAPI KeSetDmaIoCoherency(_In_ ULONG Coherency)
NTSYSCALLAPI NTSTATUS NTAPI NtCallbackReturn(_In_ PVOID Result, _In_ ULONG ResultLength, _In_ NTSTATUS Status)
Definition: usercall.c:329
@ InterruptObject
Definition: ketypes.h:428
VOID(NTAPI * PKRUNDOWN_ROUTINE)(IN struct _KAPC *Apc)
Definition: ketypes.h:750
VOID(NTAPI * PKKERNEL_ROUTINE)(IN struct _KAPC *Apc, IN OUT PKNORMAL_ROUTINE *NormalRoutine OPTIONAL, IN OUT PVOID *NormalContext OPTIONAL, IN OUT PVOID *SystemArgument1 OPTIONAL, IN OUT PVOID *SystemArgument2 OPTIONAL)
Definition: ketypes.h:754
VOID(NTAPI * PKNORMAL_ROUTINE)(IN PVOID NormalContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL)
Definition: ketypes.h:744
enum _KAPC_ENVIRONMENT KAPC_ENVIRONMENT
_In_ HANDLE ProcessHandle
Definition: mmfuncs.h:403
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2439
DWORD Interval
Definition: netstat.c:30
int Count
Definition: noreturn.cpp:7
#define FASTCALL
Definition: nt_native.h:50
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
#define NTSYSCALLAPI
Definition: ntbasedef.h:204
PCONFIGURATION_COMPONENT_DATA NTAPI KeFindConfigurationNextEntry(IN PCONFIGURATION_COMPONENT_DATA Child, IN CONFIGURATION_CLASS Class, IN CONFIGURATION_TYPE Type, IN PULONG ComponentKey OPTIONAL, IN PCONFIGURATION_COMPONENT_DATA *NextLink)
Definition: config.c:42
PCONFIGURATION_COMPONENT_DATA NTAPI KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child, IN CONFIGURATION_CLASS Class, IN CONFIGURATION_TYPE Type, IN PULONG ComponentKey OPTIONAL)
Definition: config.c:22
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
Definition: ntpoapi.h:207
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
unsigned short USHORT
Definition: pedump.c:61
#define NtGetTickCount
Definition: rtlp.h:163
enum _KINTERRUPT_MODE KINTERRUPT_MODE
enum _CONFIGURATION_CLASS CONFIGURATION_CLASS
enum _CONFIGURATION_TYPE CONFIGURATION_TYPE
base of all file and directory entries
Definition: entries.h:83
Definition: ketypes.h:547
Definition: compat.h:777
static LARGE_INTEGER Frequency
Definition: clock.c:41
static LARGE_INTEGER Counter
Definition: clock.c:43
uint32_t * PULONG_PTR
Definition: typedefs.h:65
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t * PLONG
Definition: typedefs.h:58
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
_In_ WDFREQUEST _In_ NTSTATUS _In_ CCHAR PriorityBoost
Definition: wdfrequest.h:1016
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:228
#define FORCEINLINE
Definition: wdftypes.h:67
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:174
_In_ PKSERVICE_ROUTINE ServiceRoutine
Definition: iofuncs.h:800
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
Definition: iofuncs.h:806
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL SynchronizeIrql
Definition: iofuncs.h:805
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN _In_ KAFFINITY _In_ BOOLEAN FloatingSave
Definition: iofuncs.h:809
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN ShareVector
Definition: iofuncs.h:807
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:801
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
*LockHandle LockHandle _Out_ PKLOCK_QUEUE_HANDLE LockHandle
Definition: kefuncs.h:717
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:304
enum _KSPIN_LOCK_QUEUE_NUMBER KSPIN_LOCK_QUEUE_NUMBER
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
KSERVICE_ROUTINE * PKSERVICE_ROUTINE
Definition: ketypes.h:512
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:688
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:689
KDEFERRED_ROUTINE * PKDEFERRED_ROUTINE
Definition: ketypes.h:690
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
char CHAR
Definition: xmlstorage.h:175