Add an ARC Header for future purposes (PPC, ARM, etc, ARCLoader) and implement KeFind...
[reactos.git] / reactos / include / ddk / kefuncs.h
1
2 #ifndef __INCLUDE_DDK_KEFUNCS_H
3 #define __INCLUDE_DDK_KEFUNCS_H
4
5 #define KEBUGCHECK(a) DbgPrint("KeBugCheck (0x%X) at %s:%i\n", a, __FILE__,__LINE__), KeBugCheck(a)
6
7 /* KERNEL FUNCTIONS ********************************************************/
8
9 NTSTATUS
10 STDCALL
11 KeRestoreFloatingPointState(
12 IN PKFLOATING_SAVE FloatSave);
13
14 NTSTATUS
15 STDCALL
16 KeSaveFloatingPointState(
17 OUT PKFLOATING_SAVE FloatSave);
18
19 #ifndef KeFlushIoBuffers
20 #define KeFlushIoBuffers(Mdl, ReadOperation, DmaOperation)
21 #endif
22
23 VOID STDCALL KeAttachProcess(struct _KPROCESS *Process);
24
25 BOOLEAN
26 STDCALL
27 KeIsAttachedProcess(VOID);
28
29 VOID FASTCALL KiAcquireSpinLock(PKSPIN_LOCK SpinLock);
30
31 VOID FASTCALL KiReleaseSpinLock(PKSPIN_LOCK SpinLock);
32
33 VOID KeDrainApcQueue(VOID);
34
35 struct _KPROCESS* STDCALL KeGetCurrentProcess(VOID);
36
37 /*
38 * FUNCTION: Acquires a spinlock so the caller can synchronize access to
39 * data
40 * ARGUMENTS:
41 * SpinLock = Initialized spinlock
42 * OldIrql (OUT) = Set the previous irql on return
43 */
44 VOID STDCALL KeAcquireSpinLock (PKSPIN_LOCK SpinLock,
45 PKIRQL OldIrql);
46
47 #ifndef __USE_W32API
48
49 static __inline
50 VOID
51 KeMemoryBarrier(
52 VOID)
53 {
54 volatile LONG Barrier;
55 __asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) : "%eax");
56 }
57
58 VOID STDCALL KeAcquireSpinLockAtDpcLevel (IN PKSPIN_LOCK SpinLock);
59
60 #define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel
61
62 VOID
63 STDCALL
64 KeReleaseSpinLockFromDpcLevel(
65 IN PKSPIN_LOCK SpinLock);
66
67 #endif
68
69 /*
70 * FUNCTION: Brings the system down in a controlled manner when an
71 * inconsistency that might otherwise cause corruption has been detected
72 * ARGUMENTS:
73 * BugCheckCode = Specifies the reason for the bug check
74 * RETURNS: Doesn't
75 *
76 * NOTES - please use the macro KEBUGCHECK with the same argument so the end-user
77 * knows what file/line number where the bug check occured
78 */
79 VOID STDCALL KeBugCheck (ULONG BugCheckCode);
80
81 /*
82 * FUNCTION: Brings the system down in a controlled manner when an
83 * inconsistency that might otherwise cause corruption has been detected
84 * ARGUMENTS:
85 * BugCheckCode = Specifies the reason for the bug check
86 * BugCheckParameter[1-4] = Additional information about bug
87 * RETURNS: Doesn't
88 *
89 * NOTES - please use the macro KEBUGCHECKEX with the same arguments so the end-user
90 * knows what file/line number where the bug check occured
91 */
92 VOID STDCALL KeBugCheckEx (ULONG BugCheckCode,
93 ULONG BugCheckParameter1,
94 ULONG BugCheckParameter2,
95 ULONG BugCheckParameter3,
96 ULONG BugCheckParameter4);
97
98 BOOLEAN STDCALL KeCancelTimer (PKTIMER Timer);
99
100 VOID STDCALL KeClearEvent (PKEVENT Event);
101
102 BOOLEAN STDCALL KeConnectInterrupt(PKINTERRUPT InterruptObject);
103
104 NTSTATUS STDCALL KeDelayExecutionThread (KPROCESSOR_MODE WaitMode,
105 BOOLEAN Alertable,
106 PLARGE_INTEGER Internal);
107
108 BOOLEAN STDCALL KeDeregisterBugCheckCallback (
109 PKBUGCHECK_CALLBACK_RECORD CallbackRecord);
110
111 VOID STDCALL KeDetachProcess (VOID);
112
113 VOID STDCALL KeDisconnectInterrupt(PKINTERRUPT InterruptObject);
114
115 VOID STDCALL KeEnterCriticalRegion (VOID);
116
117 /*
118 * FUNCTION: Enters the kernel debugger
119 * ARGUMENTS:
120 * None
121 */
122 VOID STDCALL KeEnterKernelDebugger (VOID);
123
124 KIRQL STDCALL KeGetCurrentIrql (VOID);
125
126 #ifndef __USE_W32API
127 #define KeGetCurrentProcessorNumber() (KeGetCurrentKPCR()->Number)
128 ULONG KeGetDcacheFillSize(VOID);
129 KPROCESSOR_MODE STDCALL KeGetPreviousMode (VOID);
130 #endif
131
132 struct _KTHREAD* STDCALL KeGetCurrentThread (VOID);
133
134 VOID STDCALL KeInitializeApc (IN PKAPC Apc,
135 IN PKTHREAD Thread,
136 IN KAPC_ENVIRONMENT TargetEnvironment,
137 IN PKKERNEL_ROUTINE KernelRoutine,
138 IN PKRUNDOWN_ROUTINE RundownRoutine,
139 IN PKNORMAL_ROUTINE NormalRoutine,
140 IN KPROCESSOR_MODE Mode,
141 IN PVOID Context);
142
143
144 /*
145 * VOID
146 * KeInitializeCallbackRecord (
147 * PKBUGCHECK_CALLBACK_RECORD CallbackRecord
148 * );
149 */
150 #ifndef KeInitializeCallbackRecord
151 #define KeInitializeCallbackRecord(CallbackRecord) \
152 (CallbackRecord)->State = BufferEmpty
153 #endif
154
155 VOID STDCALL KeInitializeDeviceQueue (PKDEVICE_QUEUE DeviceQueue);
156
157 VOID STDCALL KeInitializeDpc (PKDPC Dpc,
158 PKDEFERRED_ROUTINE DeferredRoutine,
159 PVOID DeferredContext);
160
161 VOID STDCALL KeInitializeEvent (PKEVENT Event,
162 EVENT_TYPE Type,
163 BOOLEAN State);
164
165 VOID STDCALL KeInitializeInterrupt(PKINTERRUPT InterruptObject,
166 PKSERVICE_ROUTINE ServiceRoutine,
167 PVOID ServiceContext,
168 PKSPIN_LOCK SpinLock,
169 ULONG Vector,
170 KIRQL Irql,
171 KIRQL SynchronizeIrql,
172 KINTERRUPT_MODE InterruptMode,
173 BOOLEAN ShareVector,
174 CHAR ProcessorNumber,
175 BOOLEAN FloatingSave);
176
177 VOID STDCALL KeInitializeMutant(IN PKMUTANT Mutant,
178 IN BOOLEAN InitialOwner);
179
180 VOID STDCALL KeInitializeMutex (PKMUTEX Mutex,
181 ULONG Level);
182
183 VOID STDCALL
184 KeInitializeQueue(IN PKQUEUE Queue,
185 IN ULONG Count);
186
187 PLIST_ENTRY STDCALL
188 KeRundownQueue(IN PKQUEUE Queue);
189
190 VOID STDCALL KeInitializeSemaphore (PKSEMAPHORE Semaphore,
191 LONG Count,
192 LONG Limit);
193
194 /*
195 * FUNCTION: Initializes a spinlock
196 * ARGUMENTS:
197 * SpinLock = Spinlock to initialize
198 */
199 VOID STDCALL KeInitializeSpinLock (PKSPIN_LOCK SpinLock);
200
201 VOID STDCALL KeInitializeTimer (PKTIMER Timer);
202
203 VOID STDCALL KeInitializeTimerEx (PKTIMER Timer,
204 TIMER_TYPE Type);
205
206 BOOLEAN STDCALL KeInsertByKeyDeviceQueue (PKDEVICE_QUEUE DeviceQueue,
207 PKDEVICE_QUEUE_ENTRY QueueEntry,
208 ULONG SortKey);
209
210 BOOLEAN STDCALL KeInsertDeviceQueue (PKDEVICE_QUEUE DeviceQueue,
211 PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
212
213 LONG STDCALL
214 KeInsertHeadQueue(IN PKQUEUE Queue,
215 IN PLIST_ENTRY Entry);
216
217 LONG STDCALL
218 KeInsertQueue(IN PKQUEUE Queue,
219 IN PLIST_ENTRY Entry);
220
221 BOOLEAN STDCALL KeInsertQueueApc (PKAPC Apc,
222 PVOID SystemArgument1,
223 PVOID SystemArgument2,
224 KPRIORITY PriorityBoost);
225
226 BOOLEAN STDCALL KeInsertQueueDpc (PKDPC Dpc,
227 PVOID SystemArgument1,
228 PVOID SystemArgument2);
229
230 VOID STDCALL KeLeaveCriticalRegion (VOID);
231
232 VOID STDCALL KeLowerIrql (KIRQL NewIrql);
233
234 LONG STDCALL KePulseEvent (PKEVENT Event,
235 KPRIORITY Increment,
236 BOOLEAN Wait);
237
238 LARGE_INTEGER
239 STDCALL
240 KeQueryPerformanceCounter (
241 PLARGE_INTEGER PerformanceFrequency
242 );
243
244 VOID
245 STDCALL
246 KeQuerySystemTime (
247 PLARGE_INTEGER CurrentTime
248 );
249
250 VOID
251 STDCALL
252 KeQueryTickCount (
253 PLARGE_INTEGER TickCount
254 );
255
256 ULONG
257 STDCALL
258 KeQueryTimeIncrement (
259 VOID
260 );
261
262 ULONGLONG
263 STDCALL
264 KeQueryInterruptTime(
265 VOID
266 );
267
268 VOID
269 STDCALL
270 KeRaiseIrql (
271 KIRQL NewIrql,
272 PKIRQL OldIrql
273 );
274
275 KIRQL
276 STDCALL
277 KeRaiseIrqlToDpcLevel (
278 VOID
279 );
280
281 LONG
282 STDCALL
283 KeReadStateEvent (
284 PKEVENT Event
285 );
286
287 LONG STDCALL
288 KeReadStateMutant(IN PKMUTANT Mutant);
289
290 LONG STDCALL
291 KeReadStateMutex(IN PKMUTEX Mutex);
292
293 LONG STDCALL
294 KeReadStateQueue(IN PKQUEUE Queue);
295
296 LONG STDCALL
297 KeReadStateSemaphore(IN PKSEMAPHORE Semaphore);
298
299 BOOLEAN STDCALL
300 KeReadStateTimer(IN PKTIMER Timer);
301
302 BOOLEAN
303 STDCALL
304 KeRegisterBugCheckCallback (
305 PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
306 PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine,
307 PVOID Buffer,
308 ULONG Length,
309 PUCHAR Component
310 );
311
312 LONG
313 STDCALL
314 KeReleaseMutant(
315 IN PKMUTANT Mutant,
316 IN KPRIORITY Increment,
317 IN BOOLEAN Abandon,
318 IN BOOLEAN Wait
319 );
320
321 LONG
322 STDCALL
323 KeReleaseMutex (
324 PKMUTEX Mutex,
325 BOOLEAN Wait
326 );
327
328 LONG
329 STDCALL
330 KeReleaseSemaphore (
331 PKSEMAPHORE Semaphore,
332 KPRIORITY Increment,
333 LONG Adjustment,
334 BOOLEAN Wait
335 );
336
337 VOID
338 STDCALL
339 KeReleaseSpinLock (
340 PKSPIN_LOCK Spinlock,
341 KIRQL NewIrql
342 );
343
344 #ifndef __USE_W32API
345 VOID
346 STDCALL
347 KeReleaseSpinLockFromDpcLevel (
348 PKSPIN_LOCK Spinlock
349 );
350 #endif
351
352 PKDEVICE_QUEUE_ENTRY
353 STDCALL
354 KeRemoveByKeyDeviceQueue (
355 PKDEVICE_QUEUE DeviceQueue,
356 ULONG SortKey
357 );
358
359 PKDEVICE_QUEUE_ENTRY
360 STDCALL
361 KeRemoveDeviceQueue (
362 PKDEVICE_QUEUE DeviceQueue
363 );
364
365 BOOLEAN STDCALL
366 KeRemoveEntryDeviceQueue(PKDEVICE_QUEUE DeviceQueue,
367 PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
368
369 PLIST_ENTRY STDCALL
370 KeRemoveQueue(IN PKQUEUE Queue,
371 IN KPROCESSOR_MODE WaitMode,
372 IN PLARGE_INTEGER Timeout OPTIONAL);
373
374 BOOLEAN STDCALL
375 KeRemoveQueueDpc(IN PKDPC Dpc);
376
377 LONG STDCALL
378 KeResetEvent(IN PKEVENT Event);
379
380 VOID STDCALL
381 KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount );
382
383 ULONG STDCALL
384 KeRosGetStackFrames ( PULONG Frames, ULONG FrameCount );
385
386 NTSTATUS STDCALL
387 KeSetAffinityThread(PKTHREAD Thread,
388 KAFFINITY Affinity);
389
390 LONG STDCALL
391 KeSetBasePriorityThread(struct _KTHREAD* Thread,
392 LONG Increment);
393
394 LONG
395 STDCALL
396 KeSetEvent (
397 PKEVENT Event,
398 KPRIORITY Increment,
399 BOOLEAN Wait
400 );
401
402 KPRIORITY STDCALL KeSetPriorityThread (struct _KTHREAD* Thread,
403 KPRIORITY Priority);
404
405 BOOLEAN STDCALL KeSetTimer (PKTIMER Timer,
406 LARGE_INTEGER DueTime,
407 PKDPC Dpc);
408
409 BOOLEAN STDCALL KeSetTimerEx (PKTIMER Timer,
410 LARGE_INTEGER DueTime,
411 LONG Period,
412 PKDPC Dpc);
413
414 VOID STDCALL KeStallExecutionProcessor (ULONG MicroSeconds);
415
416 BOOLEAN STDCALL KeSynchronizeExecution (PKINTERRUPT Interrupt,
417 PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
418 PVOID SynchronizeContext);
419
420 NTSTATUS STDCALL KeWaitForMultipleObjects (ULONG Count,
421 PVOID Object[],
422 WAIT_TYPE WaitType,
423 KWAIT_REASON WaitReason,
424 KPROCESSOR_MODE WaitMode,
425 BOOLEAN Alertable,
426 PLARGE_INTEGER Timeout,
427 PKWAIT_BLOCK WaitBlockArray);
428
429 NTSTATUS
430 STDCALL
431 KeWaitForMutexObject (
432 PKMUTEX Mutex,
433 KWAIT_REASON WaitReason,
434 KPROCESSOR_MODE WaitMode,
435 BOOLEAN Alertable,
436 PLARGE_INTEGER Timeout
437 );
438
439 NTSTATUS
440 STDCALL
441 KeWaitForSingleObject (
442 PVOID Object,
443 KWAIT_REASON WaitReason,
444 KPROCESSOR_MODE WaitMode,
445 BOOLEAN Alertable,
446 PLARGE_INTEGER Timeout
447 );
448
449
450
451 /* io permission map has a 8k size
452 * Each bit in the IOPM corresponds to an io port byte address. The bitmap
453 * is initialized to allow IO at any port. [ all bits set ].
454 */
455 typedef struct _IOPM
456 {
457 UCHAR Bitmap[8192];
458 } IOPM, *PIOPM;
459
460 /*
461 * FUNCTION: Provides the kernel with a new access map for a driver
462 * ARGUMENTS:
463 * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE
464 * the kernel disables access to a particular port.
465 * IoPortMap = Caller supplies storage for the io permission map.
466 * REMARKS
467 * Each bit in the IOPM corresponds to an io port byte address. The bitmap
468 * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines
469 * the minium privilege level required to perform IO prior to checking the permission map.
470 */
471 BOOL STDCALL
472 Ke386SetIoAccessMap(ULONG NewMap, PULONG IoPermissionMap);
473
474 /*
475 * FUNCTION: Queries the io permission map.
476 * ARGUMENTS:
477 * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE
478 * the kernel disables access to a particular port.
479 * IoPortMap = Caller supplies storage for the io permission map.
480 * REMARKS
481 * Each bit in the IOPM corresponds to an io port byte address. The bitmap
482 * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines
483 * the minium privilege level required to perform IO prior to checking the permission map.
484 */
485 BOOL STDCALL
486 Ke386QueryIoAccessMap(ULONG NewMap, PULONG IoPermissionMap);
487
488 /*
489 * FUNCTION: Set the process IOPL
490 * ARGUMENTS:
491 * Eprocess = Pointer to a executive process object
492 * EnableIo = Specify TRUE to enable IO and FALSE to disable
493 */
494 BOOL STDCALL
495 Ke386IoSetAccessProcess(struct _EPROCESS* Eprocess, BOOL EnableIo);
496
497 /*
498 * FUNCTION: Sets the contents of a gdt descriptor.
499 * ARGUMENTS:
500 * Entry = The selector to set.
501 * Value1 = The value of the low dword of the descriptor.
502 * Value2 = The value of the high dword of the descriptor.
503 */
504 VOID
505 KeSetGdtSelector(
506 ULONG Entry,
507 ULONG Value1,
508 ULONG Value2
509 );
510
511 /*
512 * FUNCTION: Releases a set of Global Descriptor Table Selectors
513 * ARGUMENTS:
514 * SelArray =
515 * NumOfSelectors =
516 */
517 NTSTATUS
518 KeI386ReleaseGdtSelectors(
519 OUT PULONG SelArray,
520 IN ULONG NumOfSelectors
521 );
522
523 /*
524 * FUNCTION: Allocates a set of Global Descriptor Table Selectors
525 * ARGUMENTS:
526 * SelArray =
527 * NumOfSelectors =
528 */
529 NTSTATUS
530 KeI386AllocateGdtSelectors(
531 OUT PULONG SelArray,
532 IN ULONG NumOfSelectors
533 );
534
535
536 KIRQL
537 FASTCALL
538 KfAcquireSpinLock (
539 IN PKSPIN_LOCK SpinLock
540 );
541
542 VOID
543 FASTCALL
544 KfLowerIrql (
545 IN KIRQL NewIrql
546 );
547
548
549 KIRQL
550 FASTCALL
551 KfRaiseIrql (
552 IN KIRQL NewIrql
553 );
554
555 VOID
556 FASTCALL
557 KfReleaseSpinLock (
558 IN PKSPIN_LOCK SpinLock,
559 IN KIRQL NewIrql
560 );
561
562
563 VOID STDCALL KiDispatchInterrupt(VOID);
564
565 /* Stubs Start here */
566
567 VOID
568 STDCALL
569 KeReleaseInterruptSpinLock(
570 IN PKINTERRUPT Interrupt,
571 IN KIRQL OldIrql
572 );
573
574 BOOLEAN
575 STDCALL
576 KeAreApcsDisabled(
577 VOID
578 );
579
580 VOID
581 STDCALL
582 KeFlushQueuedDpcs(
583 VOID
584 );
585
586 ULONG
587 STDCALL
588 KeGetRecommendedSharedDataAlignment(
589 VOID
590 );
591
592 ULONG
593 STDCALL
594 KeQueryRuntimeThread(
595 IN PKTHREAD Thread,
596 OUT PULONG UserTime
597 );
598
599 BOOLEAN
600 STDCALL
601 KeSetKernelStackSwapEnable(
602 IN BOOLEAN Enable
603 );
604
605 BOOLEAN
606 STDCALL
607 KeDeregisterBugCheckReasonCallback(
608 IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
609 );
610
611 BOOLEAN
612 STDCALL
613 KeRegisterBugCheckReasonCallback(
614 IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord,
615 IN PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine,
616 IN KBUGCHECK_CALLBACK_REASON Reason,
617 IN PUCHAR Component
618 );
619
620 VOID
621 STDCALL
622 KeTerminateThread(
623 IN KPRIORITY Increment
624 );
625
626 BOOLEAN
627 STDCALL
628 KeIsExecutingDpc(
629 VOID
630 );
631
632 VOID
633 STDCALL
634 KeSetEventBoostPriority(
635 IN PKEVENT Event,
636 IN PKTHREAD *Thread OPTIONAL
637 );
638
639 PCONFIGURATION_COMPONENT_DATA
640 STDCALL
641 KeFindConfigurationNextEntry(
642 IN PCONFIGURATION_COMPONENT_DATA Child,
643 IN CONFIGURATION_CLASS Class,
644 IN CONFIGURATION_TYPE Type,
645 IN PULONG ComponentKey OPTIONAL,
646 IN PCONFIGURATION_COMPONENT_DATA *NextLink
647 );
648
649 PCONFIGURATION_COMPONENT_DATA
650 STDCALL
651 KeFindConfigurationEntry(
652 IN PCONFIGURATION_COMPONENT_DATA Child,
653 IN CONFIGURATION_CLASS Class,
654 IN CONFIGURATION_TYPE Type,
655 IN PULONG ComponentKey OPTIONAL
656 );
657
658 VOID
659 STDCALL
660 KeFlushEntireTb(
661 IN BOOLEAN Unknown,
662 IN BOOLEAN CurrentCpuOnly
663 );
664
665 VOID
666 STDCALL
667 KeRevertToUserAffinityThread(
668 VOID
669 );
670
671 VOID
672 STDCALL
673 KiCoprocessorError(
674 VOID
675 );
676
677 VOID
678 STDCALL
679 KiUnexpectedInterrupt(
680 VOID
681 );
682
683 VOID
684 STDCALL
685 KeSetDmaIoCoherency(
686 IN ULONG Coherency
687 );
688
689 VOID
690 STDCALL
691 KeSetProfileIrql(
692 IN KIRQL ProfileIrql
693 );
694
695 VOID
696 STDCALL
697 KeSetSystemAffinityThread(
698 IN KAFFINITY Affinity
699 );
700
701 NTSTATUS
702 STDCALL
703 KeUserModeCallback(
704 IN ULONG FunctionID,
705 IN PVOID InputBuffer,
706 IN ULONG InputLength,
707 OUT PVOID *OutputBuffer,
708 OUT PULONG OutputLength
709 );
710
711 VOID
712 STDCALL
713 KeSetTimeIncrement(
714 IN ULONG MaxIncrement,
715 IN ULONG MinIncrement
716 );
717
718 VOID
719 STDCALL
720 KeCapturePersistentThreadState(
721 IN PVOID CurrentThread,
722 IN ULONG Setting1,
723 IN ULONG Setting2,
724 IN ULONG Setting3,
725 IN ULONG Setting4,
726 IN ULONG Setting5,
727 IN PVOID ThreadState
728 );
729
730 BOOLEAN
731 STDCALL
732 KeRemoveSystemServiceTable(
733 IN ULONG TableIndex
734 );
735
736 NTSTATUS
737 KeI386FlatToGdtSelector(
738 IN ULONG Base,
739 IN USHORT Length,
740 IN USHORT Selector
741 );
742
743 CCHAR
744 STDCALL
745 KeSetIdealProcessorThread (
746 IN PKTHREAD Thread,
747 IN CCHAR Processor
748 );
749
750 typedef
751 VOID
752 (FASTCALL *PTIME_UPDATE_NOTIFY_ROUTINE)(
753 IN HANDLE ThreadId,
754 IN KPROCESSOR_MODE Mode
755 );
756
757 VOID
758 FASTCALL
759 KeSetTimeUpdateNotifyRoutine(
760 IN PTIME_UPDATE_NOTIFY_ROUTINE NotifyRoutine
761 );
762
763 PKDEVICE_QUEUE_ENTRY
764 STDCALL
765 KeRemoveByKeyDeviceQueueIfBusy (
766 IN PKDEVICE_QUEUE DeviceQueue,
767 IN ULONG SortKey
768 );
769
770 KAFFINITY
771 STDCALL
772 KeQueryActiveProcessors (
773 VOID
774 );
775
776 VOID
777 FASTCALL
778 KeAcquireInStackQueuedSpinLockAtDpcLevel(
779 IN PKSPIN_LOCK SpinLock,
780 IN PKLOCK_QUEUE_HANDLE LockHandle
781 );
782
783 VOID
784 FASTCALL
785 KeReleaseInStackQueuedSpinLockFromDpcLevel(
786 IN PKLOCK_QUEUE_HANDLE LockHandle
787 );
788
789 KPRIORITY
790 STDCALL
791 KeQueryPriorityThread (
792 IN PKTHREAD Thread
793 );
794
795 KIRQL
796 STDCALL
797 KeAcquireInterruptSpinLock(
798 IN PKINTERRUPT Interrupt
799 );
800
801 VOID
802 __cdecl
803 KeSaveStateForHibernate(
804 IN PVOID State
805 );
806
807 NTSTATUS
808 STDCALL
809 KeRaiseUserException(
810 IN NTSTATUS ExceptionCode
811 );
812
813 VOID
814 FASTCALL
815 KeAcquireGuardedMutex(
816 PKGUARDED_MUTEX GuardedMutex
817 );
818
819 VOID
820 FASTCALL
821 KeAcquireGuardedMutexUnsafe(
822 PKGUARDED_MUTEX GuardedMutex
823 );
824
825 VOID
826 STDCALL
827 KeEnterGuardedRegion(VOID);
828
829 VOID
830 STDCALL
831 KeLeaveGuardedRegion(VOID);
832
833 VOID
834 FASTCALL
835 KeInitializeGuardedMutex(
836 PKGUARDED_MUTEX GuardedMutex
837 );
838
839 VOID
840 FASTCALL
841 KeReleaseGuardedMutexUnsafe(
842 PKGUARDED_MUTEX GuardedMutex
843 );
844
845 VOID
846 FASTCALL
847 KeReleaseGuardedMutex(
848 PKGUARDED_MUTEX GuardedMutex
849 );
850
851 BOOL
852 FASTCALL
853 KeTryToAcquireGuardedMutex(
854 PKGUARDED_MUTEX GuardedMutex
855 );
856
857 #endif /* __INCLUDE_DDK_KEFUNCS_H */