ntoskrnl.exe: Implement KeInitializeApc.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
72540c9301
commit
2a578eaeb6
|
@ -564,7 +564,7 @@
|
|||
@ stub KeI386ReleaseLid
|
||||
@ stub KeI386SetGdtSelector
|
||||
@ stub KeIcacheFlushCount
|
||||
@ stub KeInitializeApc
|
||||
@ stdcall KeInitializeApc(ptr ptr long ptr ptr ptr long ptr)
|
||||
@ stub KeInitializeDeviceQueue
|
||||
@ stdcall KeInitializeDpc(ptr ptr ptr)
|
||||
@ stdcall KeInitializeEvent(ptr long long)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "wine/asm.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/server.h"
|
||||
|
||||
#include "ntoskrnl_private.h"
|
||||
|
||||
|
@ -663,6 +664,38 @@ void WINAPI KeReleaseInStackQueuedSpinLock( KLOCK_QUEUE_HANDLE *queue )
|
|||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* KeInitializeApc (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
void WINAPI KeInitializeApc(PRKAPC apc, PRKTHREAD thread, KAPC_ENVIRONMENT env, PKKERNEL_ROUTINE krnl_routine,
|
||||
PKRUNDOWN_ROUTINE rundown_routine, PKNORMAL_ROUTINE normal_routine, KPROCESSOR_MODE apc_mode, PVOID ctx)
|
||||
{
|
||||
TRACE("apc %p thread %p env %u krnl_routine %p rundown_routine %p normal_routine %p apc_mode %u ctx %p\n",
|
||||
apc, thread, env, krnl_routine, rundown_routine, normal_routine, apc_mode, ctx);
|
||||
|
||||
if (env != OriginalApcEnvironment)
|
||||
FIXME("Unhandled APC_ENVIRONMENT\n");
|
||||
|
||||
apc->Type = 18;
|
||||
apc->Size = sizeof(*apc);
|
||||
apc->Thread = thread;
|
||||
apc->ApcStateIndex = env;
|
||||
apc->KernelRoutine = krnl_routine;
|
||||
apc->RundownRoutine = rundown_routine;
|
||||
apc->NormalRoutine = normal_routine;
|
||||
apc->Inserted = FALSE;
|
||||
if (apc->NormalRoutine)
|
||||
{
|
||||
apc->ApcMode = apc_mode;
|
||||
apc->NormalContext = ctx;
|
||||
}
|
||||
else
|
||||
{
|
||||
apc->ApcMode = KernelMode;
|
||||
apc->NormalContext = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static KSPIN_LOCK cancel_lock;
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -464,6 +464,13 @@ typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
|
|||
/* Irp definitions */
|
||||
typedef UCHAR KIRQL, *PKIRQL;
|
||||
typedef CCHAR KPROCESSOR_MODE;
|
||||
typedef enum _KAPC_ENVIRONMENT
|
||||
{
|
||||
OriginalApcEnvironment,
|
||||
AttachedApcEnvironment,
|
||||
CurrentApcEnvironment,
|
||||
InsertApcEnvironment
|
||||
} KAPC_ENVIRONMENT, *PKAPC_ENVIRONMENT;
|
||||
|
||||
typedef VOID (WINAPI *PDRIVER_CANCEL)(
|
||||
IN struct _DEVICE_OBJECT *DeviceObject,
|
||||
|
|
Loading…
Reference in New Issue