ReactOS  r76032
stubs.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: GPL - See COPYING in the top level directory
4  * PURPOSE: stubs
5  * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
6  */
7 
8 /* INCLUDES ******************************************************************/
9 
10 #include <ntoskrnl.h>
11 
12 #define NDEBUG
13 #include <debug.h>
14 
15 VOID
17  PKPRCB Prcb,
18  PVOID DpcStack);
19 
20 VOID
21 NTAPI
23 {
24  PKPRCB Prcb = KeGetCurrentPrcb();
25  PKTHREAD NewThread, OldThread;
26  KIRQL OldIrql;
27 
28  /* Raise to DISPATCH_LEVEL */
29  OldIrql = KfRaiseIrql(DISPATCH_LEVEL);
30 
31  /* Send an EOI */
32  KiSendEOI();
33 
34  /* Check for pending timers, pending DPCs, or pending ready threads */
35  if ((Prcb->DpcData[0].DpcQueueDepth) ||
36  (Prcb->TimerRequest) ||
38  {
39  /* Retire DPCs while under the DPC stack */
41  }
42 
43  /* Enable interrupts */
44  _enable();
45 
46  /* Check for quantum end */
47  if (Prcb->QuantumEnd)
48  {
49  /* Handle quantum end */
50  Prcb->QuantumEnd = FALSE;
51  KiQuantumEnd();
52  }
53  else if (Prcb->NextThread)
54  {
55  /* Capture current thread data */
56  OldThread = Prcb->CurrentThread;
57  NewThread = Prcb->NextThread;
58 
59  /* Set new thread data */
60  Prcb->NextThread = NULL;
61  Prcb->CurrentThread = NewThread;
62 
63  /* The thread is now running */
64  NewThread->State = Running;
65  OldThread->WaitReason = WrDispatchInt;
66 
67  /* Make the old thread ready */
68  KxQueueReadyThread(OldThread, Prcb);
69 
70  /* Swap to the new thread */
71  KiSwapContext(APC_LEVEL, OldThread);
72  }
73 
74  /* Go back to old irql and disable interrupts */
75  KeLowerIrql(OldIrql);
76  _disable();
77 }
78 
79 
80 VOID
83  IN ULONG Size)
84 {
85  /* Not using XMMI in this routine */
86  RtlZeroMemory(Address, Size);
87 }
88 
89 PVOID
90 NTAPI
91 KeSwitchKernelStack(PVOID StackBase, PVOID StackLimit)
92 {
94  __debugbreak();
95  return NULL;
96 }
97 
99 NTAPI
101  IN PVOID Argument,
102  IN ULONG ArgumentLength,
103  OUT PVOID *Result,
105 {
107  __debugbreak();
108  return STATUS_UNSUCCESSFUL;
109 }
110 
111 VOID
112 FASTCALL
114 {
115  PKPRCB Prcb = KeGetCurrentPrcb();
116  PKTHREAD OldThread, NewThread;
117 
118  /* Now loop forever */
119  while (TRUE)
120  {
121  /* Start of the idle loop: disable interrupts */
122  _enable();
123  YieldProcessor();
124  YieldProcessor();
125  _disable();
126 
127  /* Check for pending timers, pending DPCs, or pending ready threads */
128  if ((Prcb->DpcData[0].DpcQueueDepth) ||
129  (Prcb->TimerRequest) ||
130  (Prcb->DeferredReadyListHead.Next))
131  {
132  /* Quiesce the DPC software interrupt */
134 
135  /* Handle it */
136  KiRetireDpcList(Prcb);
137  }
138 
139  /* Check if a new thread is scheduled for execution */
140  if (Prcb->NextThread)
141  {
142  /* Enable interrupts */
143  _enable();
144 
145  /* Capture current thread data */
146  OldThread = Prcb->CurrentThread;
147  NewThread = Prcb->NextThread;
148 
149  /* Set new thread data */
150  Prcb->NextThread = NULL;
151  Prcb->CurrentThread = NewThread;
152 
153  /* The thread is now running */
154  NewThread->State = Running;
155 
156  /* Do the swap at SYNCH_LEVEL */
158 
159  /* Switch away from the idle thread */
160  KiSwapContext(APC_LEVEL, OldThread);
161 
162  /* Go back to DISPATCH_LEVEL */
164  }
165  else
166  {
167  /* Continue staying idle. Note the HAL returns with interrupts on */
168  Prcb->PowerState.IdleFunction(&Prcb->PowerState);
169  }
170  }
171 }
172 
173 
201 VOID
202 NTAPI
204  IN PKTRAP_FRAME TrapFrame,
205  IN PKNORMAL_ROUTINE NormalRoutine,
206  IN PVOID NormalContext,
209 {
211  ULONG64 AlignedRsp, Stack;
212  EXCEPTION_RECORD SehExceptRecord;
213 
214  /* Sanity check, that the trap frame is from user mode */
215  ASSERT((TrapFrame->SegCs & MODE_MASK) != KernelMode);
216 
217  /* Convert the current trap frame to a context */
219  KeTrapFrameToContext(TrapFrame, ExceptionFrame, &Context);
220 
221  /* We jump to KiUserApcDispatcher in ntdll */
222  TrapFrame->Rip = (ULONG64)KeUserApcDispatcher;
223 
224  /* Setup Ring 3 segments */
225  TrapFrame->SegCs = KGDT64_R3_CODE | RPL_MASK;
226  TrapFrame->SegDs = KGDT64_R3_DATA | RPL_MASK;
227  TrapFrame->SegEs = KGDT64_R3_DATA | RPL_MASK;
228  TrapFrame->SegFs = KGDT64_R3_CMTEB | RPL_MASK;
229  TrapFrame->SegGs = KGDT64_R3_DATA | RPL_MASK;
230  TrapFrame->SegSs = KGDT64_R3_DATA | RPL_MASK;
231 
232  /* Sanitize EFLAGS, enable interrupts */
233  TrapFrame->EFlags = (Context.EFlags & EFLAGS_USER_SANITIZE);
234  TrapFrame->EFlags |= EFLAGS_INTERRUPT_MASK;
235 
236  /* Set parameters for KiUserApcDispatcher */
237  Context.P1Home = (ULONG64)NormalContext;
238  Context.P2Home = (ULONG64)SystemArgument1;
239  Context.P3Home = (ULONG64)SystemArgument2;
240  Context.P4Home = (ULONG64)NormalRoutine;
241 
242  /* Check if thread has IOPL and force it enabled if so */
243  //if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= EFLAGS_IOPL;
244 
245  /* Align Stack to 16 bytes and allocate space */
246  AlignedRsp = Context.Rsp & ~15;
247  Stack = AlignedRsp - sizeof(CONTEXT);
248  TrapFrame->Rsp = Stack;
249 
250  /* The stack must be 16 byte aligned for KiUserApcDispatcher */
251  ASSERT((Stack & 15) == 0);
252 
253  /* Protect with SEH */
254  _SEH2_TRY
255  {
256  /* Probe the stack */
257  ProbeForWrite((PCONTEXT)Stack, sizeof(CONTEXT), 8);
258 
259  /* Copy the context */
260  RtlCopyMemory((PCONTEXT)Stack, &Context, sizeof(CONTEXT));
261  }
263  {
264  /* Dispatch the exception */
265  SehExceptRecord.ExceptionAddress = (PVOID)TrapFrame->Rip;
266  KiDispatchException(&SehExceptRecord,
267  ExceptionFrame,
268  TrapFrame,
269  UserMode,
270  TRUE);
271  }
272  _SEH2_END;
273 }
274 
275 VOID
276 NTAPI
278  IN PKPROCESS OldProcess)
279 {
280  PKIPCR Pcr = (PKIPCR)KeGetPcr();
281 #ifdef CONFIG_SMP
282  LONG SetMember;
283 
284  /* Update active processor mask */
285  SetMember = (LONG)Pcr->SetMember;
286  InterlockedXor((PLONG)&NewProcess->ActiveProcessors, SetMember);
287  InterlockedXor((PLONG)&OldProcess->ActiveProcessors, SetMember);
288 #endif
289 
290  /* Update CR3 */
291  __writecr3(NewProcess->DirectoryTableBase[0]);
292 
293  /* Update IOPM offset */
294  Pcr->TssBase->IoMapBase = NewProcess->IopmOffset;
295 }
296 
297 #define MAX_SYSCALL_PARAMS 16
298 
299 NTSTATUS
301 {
302  /* This is the failure function */
304 }
305 
306 PVOID
308  IN PKTRAP_FRAME TrapFrame,
309  IN ULONG64 P2,
310  IN ULONG64 P3,
311  IN ULONG64 P4)
312 {
313  PKSERVICE_TABLE_DESCRIPTOR DescriptorTable;
315  PULONG64 KernelParams, UserParams;
316  ULONG ServiceNumber, Offset, Count;
317  ULONG64 UserRsp;
318 
319  DPRINT("Syscall #%ld\n", TrapFrame->Rax);
320  //__debugbreak();
321 
322  /* Increase system call count */
323  __addgsdword(FIELD_OFFSET(KIPCR, Prcb.KeSystemCalls), 1);
324 
325  /* Get the current thread */
326  Thread = KeGetCurrentThread();
327 
328  /* Set previous mode */
329  Thread->PreviousMode = TrapFrame->PreviousMode = UserMode;
330 
331  /* Save the old trap frame and set the new */
332  TrapFrame->TrapFrame = (ULONG64)Thread->TrapFrame;
333  Thread->TrapFrame = TrapFrame;
334 
335  /* Before enabling interrupts get the user rsp from the KPCR */
336  UserRsp = __readgsqword(FIELD_OFFSET(KIPCR, UserRsp));
337  TrapFrame->Rsp = UserRsp;
338 
339  /* Enable interrupts */
340  _enable();
341 
342  /* If the usermode rsp was not a usermode address, prepare an exception */
343  if (UserRsp > MmUserProbeAddress) UserRsp = MmUserProbeAddress;
344 
345  /* Get the address of the usermode and kernelmode parameters */
346  UserParams = (PULONG64)UserRsp + 1;
347  KernelParams = (PULONG64)TrapFrame - MAX_SYSCALL_PARAMS;
348 
349  /* Get the system call number from the trap frame and decode it */
350  ServiceNumber = (ULONG)TrapFrame->Rax;
351  Offset = (ServiceNumber >> SERVICE_TABLE_SHIFT) & SERVICE_TABLE_MASK;
352  ServiceNumber &= SERVICE_NUMBER_MASK;
353 
354  /* Get descriptor table */
355  DescriptorTable = (PVOID)((ULONG_PTR)Thread->ServiceTable + Offset);
356 
357  /* Get stack bytes and calculate argument count */
358  Count = DescriptorTable->Number[ServiceNumber] / 8;
359 
360  __try
361  {
362  switch (Count)
363  {
364  case 16: KernelParams[15] = UserParams[15];
365  case 15: KernelParams[14] = UserParams[14];
366  case 14: KernelParams[13] = UserParams[13];
367  case 13: KernelParams[12] = UserParams[12];
368  case 12: KernelParams[11] = UserParams[11];
369  case 11: KernelParams[10] = UserParams[10];
370  case 10: KernelParams[9] = UserParams[9];
371  case 9: KernelParams[8] = UserParams[8];
372  case 8: KernelParams[7] = UserParams[7];
373  case 7: KernelParams[6] = UserParams[6];
374  case 6: KernelParams[5] = UserParams[5];
375  case 5: KernelParams[4] = UserParams[4];
376  case 4: KernelParams[3] = P4;
377  case 3: KernelParams[2] = P3;
378  case 2: KernelParams[1] = P2;
379  case 1: KernelParams[0] = TrapFrame->R10;
380  case 0:
381  break;
382 
383  default:
384  __debugbreak();
385  break;
386  }
387  }
388  __except(1)
389  {
390  TrapFrame->Rax = _SEH2_GetExceptionCode();
391  return (PVOID)NtSyscallFailure;
392  }
393 
394 
395  return (PVOID)DescriptorTable->Base[ServiceNumber];
396 }
397 
398 
399 // FIXME: we need to
400 VOID
402  IN PKTRAP_FRAME TrapFrame,
403  IN ULONG Instruction)
404 {
406  __debugbreak();
407 }
408 
409 NTSYSAPI
410 NTSTATUS
411 NTAPI
414 {
416  __debugbreak();
417  return STATUS_UNSUCCESSFUL;
418 }
419 
420 NTSTATUS
421 NTAPI
423 (ULONG Selector1, LDT_ENTRY LdtEntry1, ULONG Selector2, LDT_ENTRY LdtEntry2)
424 {
426  __debugbreak();
427  return STATUS_UNSUCCESSFUL;
428 }
429 
430 NTSTATUS
431 NTAPI
433  IN PVOID ControlData)
434 {
435  /* Not supported */
436  return STATUS_NOT_IMPLEMENTED;
437 }
438 
439 NTSTATUS
440 NTAPI
443  IN PULONG OutputLength)
444 {
446  __debugbreak();
447  return STATUS_UNSUCCESSFUL;
448 }
449 
452 
453 
ULONG MmUserProbeAddress
Definition: init.c:50
DWORD *typedef PVOID
Definition: winlogon.h:52
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
NTSTATUS NTAPI NtVdmControl(IN ULONG ControlCode, IN PVOID ControlData)
Definition: stubs.c:432
NTSTATUS NTAPI KeUserModeCallback(IN ULONG RoutineIndex, IN PVOID Argument, IN ULONG ArgumentLength, OUT PVOID *Result, OUT PULONG ResultLength)
Definition: stubs.c:100
#define KGDT64_R3_CODE
Definition: ketypes.h:76
#define IN
Definition: typedefs.h:38
#define SERVICE_TABLE_SHIFT
Definition: ketypes.h:71
struct _CONTEXT CONTEXT
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
PVOID ULONG Address
Definition: oprghdlr.h:14
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define MODE_MASK
Definition: orders.h:326
VOID NTAPI KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame, IN PKTRAP_FRAME TrapFrame, IN PKNORMAL_ROUTINE NormalRoutine, IN PVOID NormalContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: stubs.c:203
VOID FASTCALL KeZeroPages(IN PVOID Address, IN ULONG Size)
Definition: stubs.c:82
PVOID KeUserApcDispatcher
Definition: ke.h:130
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
KDPC_DATA DpcData[2]
Definition: ketypes.h:676
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
PVOID KiSystemCallHandler(IN PKTRAP_FRAME TrapFrame, IN ULONG64 P2, IN ULONG64 P3, IN ULONG64 P4)
Definition: stubs.c:307
PVOID ServiceTable
Definition: ketypes.h:1102
#define SERVICE_TABLE_MASK
Definition: ketypes.h:78
void __cdecl _enable(void)
Definition: intrin_arm.h:373
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1054
struct _KIPCR * PKIPCR
VOID KiRetireDpcListInDpcStack(PKPRCB Prcb, PVOID DpcStack)
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#define KGDT64_R3_CMTEB
Definition: ketypes.h:78
PKTRAP_FRAME TrapFrame
Definition: ketypes.h:1181
VOID NTAPI KiQuantumEnd(VOID)
Definition: dpc.c:465
PROCESSOR_POWER_STATE PowerState
Definition: ketypes.h:795
#define CONTEXT_FULL
Definition: compat.h:270
UCHAR QuantumEnd
Definition: ketypes.h:696
_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:426
#define SERVICE_NUMBER_MASK
Definition: ketypes.h:83
#define UNIMPLEMENTED
Definition: stubs.c:20
#define FASTCALL
Definition: nt_native.h:50
#define NTSYSAPI
Definition: ntoskrnl.h:14
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
struct _KTHREAD * NextThread
Definition: ketypes.h:567
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
#define KeGetPcr()
Definition: ke.h:25
PVOID ExceptionAddress
Definition: compat.h:199
struct _KTSS64 * TssBase
Definition: ketypes.h:861
uint32_t ULONG_PTR
Definition: typedefs.h:63
FORCEINLINE VOID YieldProcessor(VOID)
Definition: ke.h:32
BOOLEAN CcPfEnablePrefetcher
Definition: stubs.c:451
UCHAR KIRQL
Definition: env_spec_w32.h:591
FORCEINLINE VOID KxQueueReadyThread(IN PKTHREAD Thread, IN PKPRCB Prcb)
Definition: ke_x.h:1343
__INTRIN_INLINE void __writecr3(unsigned int Data)
Definition: intrin_x86.h:1572
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
VOID NTAPI KiDispatchException(PEXCEPTION_RECORD ExceptionRecord, PKEXCEPTION_FRAME ExceptionFrame, PKTRAP_FRAME Tf, KPROCESSOR_MODE PreviousMode, BOOLEAN SearchFrames)
#define KGDT64_R3_DATA
Definition: ketypes.h:75
#define _SEH2_END
Definition: pseh2_64.h:7
uint64_t ULONG64
Definition: typedefs.h:65
#define EFLAGS_USER_SANITIZE
Definition: ketypes.h:133
ULONG ProcessCount
Definition: stubs.c:450
NTSTATUS NTAPI NtSetLdtEntries(ULONG Selector1, LDT_ENTRY LdtEntry1, ULONG Selector2, LDT_ENTRY LdtEntry2)
Definition: stubs.c:423
#define _SEH2_GetExceptionInformation()
Definition: pseh2_64.h:11
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
struct _KTHREAD * CurrentThread
Definition: ketypes.h:566
#define RPL_MASK
Definition: ketypes.h:69
smooth NULL
Definition: ftsmooth.c:557
KAFFINITY SetMember
Definition: ketypes.h:761
void DPRINT(...)
Definition: polytest.cpp:61
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
VOID FASTCALL KiIdleLoop(VOID)
Definition: stubs.c:113
ULONG EFlags
Definition: nt_native.h:1478
VOID NTAPI KeTrapFrameToContext(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN OUT PCONTEXT Context)
Definition: context.c:146
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
NTSTATUS NtSyscallFailure(void)
Definition: stubs.c:300
UCHAR PreviousMode
Definition: ketypes.h:1216
UCHAR WaitReason
Definition: ketypes.h:1249
ULONG ContextFlags
Definition: compat.h:331
UINTN Size
Definition: acefiex.h:555
KIRQL FASTCALL KfRaiseIrql(IN KIRQL NewIrql)
Definition: pic.c:187
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:660
unsigned char BOOLEAN
UINT64 TimerRequest
Definition: ketypes.h:691
#define MAX_SYSCALL_PARAMS
Definition: stubs.c:297
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
VOID(NTAPI * PKNORMAL_ROUTINE)(IN PVOID NormalContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL)
Definition: ketypes.h:632
#define LONG
Definition: msvc.h:36
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:628
VOID FORCEINLINE KiSendEOI(VOID)
Definition: ke.h:263
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
BOOLEAN NTAPI KiSwapContext(PKTHREAD CurrentThread, PKTHREAD NewThread)
Definition: stubs.c:147
#define SYNCH_LEVEL
Definition: env_spec_w32.h:704
Status
Definition: gdiplustypes.h:24
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:660
Definition: compat.h:428
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
SINGLE_LIST_ENTRY DeferredReadyListHead
Definition: ketypes.h:628
volatile ULONG DpcQueueDepth
Definition: ketypes.h:746
LONG NTSTATUS
Definition: DriverTester.h:11
PVOID DpcStack
Definition: ketypes.h:677
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228
UINT64 Rsp
Definition: ketypes.h:386
#define _SEH2_TRY
Definition: pseh2_64.h:5
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
unsigned int * PULONG
Definition: retypes.h:1
PVOID NTAPI KeSwitchKernelStack(PVOID StackBase, PVOID StackLimit)
Definition: stubs.c:91
NTSTATUS NTAPI KiCallUserMode(IN PVOID *OutputBuffer, IN PULONG OutputLength)
Definition: stubs.c:441
PPROCESSOR_IDLE_FUNCTION IdleFunction
Definition: potypes.h:54
VOID FASTCALL HalClearSoftwareInterrupt(IN KIRQL Irql)
Definition: pic.c:282
#define OUT
Definition: typedefs.h:39
volatile UCHAR State
Definition: ketypes.h:997
void __cdecl _disable(void)
Definition: intrin_arm.h:365
struct tagContext Context
Definition: acpixf.h:1014
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
unsigned __int64 * PULONG64
Definition: basetsd.h:186
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
#define KeGetCurrentThread
Definition: hal.h:44
VOID NTAPI KiDpcInterruptHandler(VOID)
Definition: stubs.c:22
signed int * PLONG
Definition: retypes.h:5
VOID NTAPI KiSwapProcess(IN PKPROCESS NewProcess, IN PKPROCESS OldProcess)
Definition: stubs.c:277
#define APC_LEVEL
Definition: env_spec_w32.h:695
VOID KiSystemService(IN PKTHREAD Thread, IN PKTRAP_FRAME TrapFrame, IN ULONG Instruction)
Definition: stubs.c:401
IN HDEVINFO IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
Definition: devinst.c:44
VOID FASTCALL KiRetireDpcList(IN PKPRCB Prcb)
Definition: dpc.c:561
#define CONTEXT_DEBUG_REGISTERS
Definition: compat.h:268
NTSYSAPI NTSTATUS NTAPI NtCallbackReturn(IN PVOID Result OPTIONAL, IN ULONG ResultLength, IN NTSTATUS Status)
Definition: stubs.c:413
#define EFLAGS_INTERRUPT_MASK
Definition: ketypes.h:126
#define InterlockedXor
Definition: interlocked.h:266