{
ULONG Size; // Size of the wait block (variable-sized)
LIST_ENTRY WaitList;
- LIST_ENTRY UserWaitList;
PVOID WaitContext;
PCSR_THREAD WaitThread;
CSR_WAIT_FUNCTION WaitFunction;
IN CSR_WAIT_FUNCTION WaitFunction,
IN PCSR_THREAD CsrWaitThread,
IN OUT PCSR_API_MESSAGE WaitApiMessage,
- IN PVOID WaitContext,
- IN PLIST_ENTRY UserWaitList OPTIONAL);
+ IN PVOID WaitContext);
NTSTATUS
NTAPI
@ stdcall CsrCreateProcess(ptr ptr ptr ptr long ptr)
@ stdcall CsrCreateRemoteThread(ptr ptr)
@ stdcall CsrCreateThread(ptr ptr ptr long)
-@ stdcall CsrCreateWait(ptr ptr ptr ptr ptr ptr)
+@ stdcall CsrCreateWait(ptr ptr ptr ptr ptr)
@ stdcall CsrDebugProcess(ptr)
@ stdcall CsrDebugProcessStop(ptr)
@ stdcall CsrDereferenceProcess(ptr)
CsrWaitThread->WaitBlock = WaitBlock;
WaitBlock->WaitContext = WaitContext;
WaitBlock->WaitFunction = WaitFunction;
- WaitBlock->UserWaitList.Flink = NULL;
- WaitBlock->UserWaitList.Blink = NULL;
- WaitBlock->WaitList = WaitBlock->UserWaitList;
+ WaitBlock->WaitList.Flink = NULL;
+ WaitBlock->WaitList.Blink = NULL;
/* Copy the message */
- RtlMoveMemory(&WaitBlock->WaitApiMessage,
+ RtlCopyMemory(&WaitBlock->WaitApiMessage,
WaitApiMessage,
WaitApiMessage->Header.u1.s1.TotalLength);
RemoveEntryList(&WaitBlock->WaitList);
}
- /* Remove it from the User Wait List */
- if (WaitBlock->UserWaitList.Flink)
- {
- RemoveEntryList(&WaitBlock->UserWaitList);
- }
-
/* Dereference the thread */
CsrDereferenceThread(WaitBlock->WaitThread);
* @param WaitContext
* Pointer to a user-defined parameter associated to this wait.
*
- * @param UserWaitList
- * Pointer to a list entry of the user-defined waits to associate.
- *
* @return TRUE in case of success, FALSE otherwise.
*
* @remarks None.
IN CSR_WAIT_FUNCTION WaitFunction,
IN PCSR_THREAD CsrWaitThread,
IN OUT PCSR_API_MESSAGE WaitApiMessage,
- IN PVOID WaitContext,
- IN PLIST_ENTRY UserWaitList OPTIONAL)
+ IN PVOID WaitContext)
{
PCSR_WAIT_BLOCK WaitBlock;
/* Insert the wait in the queue */
InsertTailList(WaitList, &WaitBlock->WaitList);
- /* Insert the User Wait too, if one was given */
- if (UserWaitList) InsertTailList(UserWaitList, &WaitBlock->UserWaitList);
-
/* Return */
CsrReleaseWaitLock();
return TRUE;
RemoveEntryList(&WaitBlock->WaitList);
}
- /* Remove it from the User Wait List */
- if (WaitBlock->UserWaitList.Flink)
- {
- RemoveEntryList(&WaitBlock->UserWaitList);
- }
-
/* Dereference the thread waiting on it */
CsrDereferenceThread(WaitBlock->WaitThread);