mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[NTOSKRNL][PS] Implement NtQueueApcThreadEx and use it in NtQueueApcThread
Actually rename NtQueueApcThread to NtQueueApcThreadEx and ignore one additional parameter for now.
This commit is contained in:
parent
c96ba1aff2
commit
b607e0119f
|
@ -470,7 +470,7 @@ NtTestAlert(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*++
|
/*++
|
||||||
* @name NtQueueApcThread
|
* @name NtQueueApcThreadEx
|
||||||
* NT4
|
* NT4
|
||||||
*
|
*
|
||||||
* This routine is used to queue an APC from user-mode for the specified
|
* This routine is used to queue an APC from user-mode for the specified
|
||||||
|
@ -480,6 +480,10 @@ NtTestAlert(VOID)
|
||||||
* Handle to the Thread.
|
* Handle to the Thread.
|
||||||
* This handle must have THREAD_SET_CONTEXT privileges.
|
* This handle must have THREAD_SET_CONTEXT privileges.
|
||||||
*
|
*
|
||||||
|
* @param UserApcReserveHandle
|
||||||
|
* Optional handle to reserve object (introduced in Windows 7), providing ability to
|
||||||
|
* reserve memory before performing stability-critical parts of code.
|
||||||
|
*
|
||||||
* @param ApcRoutine
|
* @param ApcRoutine
|
||||||
* Pointer to the APC Routine to call when the APC executes.
|
* Pointer to the APC Routine to call when the APC executes.
|
||||||
*
|
*
|
||||||
|
@ -497,11 +501,12 @@ NtTestAlert(VOID)
|
||||||
*--*/
|
*--*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
NtQueueApcThread(IN HANDLE ThreadHandle,
|
NtQueueApcThreadEx(IN HANDLE ThreadHandle,
|
||||||
|
IN OPTIONAL HANDLE UserApcReserveHandle,
|
||||||
IN PKNORMAL_ROUTINE ApcRoutine,
|
IN PKNORMAL_ROUTINE ApcRoutine,
|
||||||
IN PVOID NormalContext,
|
IN PVOID NormalContext,
|
||||||
IN PVOID SystemArgument1,
|
IN OPTIONAL PVOID SystemArgument1,
|
||||||
IN PVOID SystemArgument2)
|
IN OPTIONAL PVOID SystemArgument2)
|
||||||
{
|
{
|
||||||
PKAPC Apc;
|
PKAPC Apc;
|
||||||
PETHREAD Thread;
|
PETHREAD Thread;
|
||||||
|
@ -564,4 +569,41 @@ Quit:
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*++
|
||||||
|
* @name NtQueueApcThread
|
||||||
|
* NT4
|
||||||
|
*
|
||||||
|
* This routine is used to queue an APC from user-mode for the specified
|
||||||
|
* thread.
|
||||||
|
*
|
||||||
|
* @param ThreadHandle
|
||||||
|
* Handle to the Thread.
|
||||||
|
* This handle must have THREAD_SET_CONTEXT privileges.
|
||||||
|
*
|
||||||
|
* @param ApcRoutine
|
||||||
|
* Pointer to the APC Routine to call when the APC executes.
|
||||||
|
*
|
||||||
|
* @param NormalContext
|
||||||
|
* Pointer to the context to send to the Normal Routine.
|
||||||
|
*
|
||||||
|
* @param SystemArgument[1-2]
|
||||||
|
* Pointer to a set of two parameters that contain untyped data.
|
||||||
|
*
|
||||||
|
* @return STATUS_SUCCESS or failure cute from associated calls.
|
||||||
|
*
|
||||||
|
* @remarks The thread must enter an alertable wait before the APC will be
|
||||||
|
* delivered.
|
||||||
|
*
|
||||||
|
*--*/
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
NtQueueApcThread(IN HANDLE ThreadHandle,
|
||||||
|
IN PKNORMAL_ROUTINE ApcRoutine,
|
||||||
|
IN PVOID NormalContext,
|
||||||
|
IN PVOID SystemArgument1,
|
||||||
|
IN PVOID SystemArgument2)
|
||||||
|
{
|
||||||
|
return NtQueueApcThreadEx(ThreadHandle, NULL, ApcRoutine, NormalContext, SystemArgument1, SystemArgument2);
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -467,6 +467,18 @@ NtQueueApcThread(
|
||||||
_In_opt_ PVOID SystemArgument2
|
_In_opt_ PVOID SystemArgument2
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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
|
NTSYSCALLAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
Loading…
Reference in a new issue