#include <windows.h>
#include <stdio.h>
#include <ndk/ntndk.h>
Go to the source code of this file.
◆ NTOS_MODE_USER
◆ WIN32_NO_STATUS
◆ main()
Definition at line 22 of file threadwait.c.
23{
26
28 printf(
"Main: ThreadId for new thread is %08lx\n",
id);
29 printf(
"Main: Waiting on thread...\n");
31 printf(
"Main: OK, somebody fixed the PsUnblockThread spinlock double-acquire crash\n");
33 printf(
"Main: Terminating...\n");
34 return 0;
35}
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
DWORD __stdcall threadfunc(void *UNREFERENCED)
◆ threadfunc()
Definition at line 14 of file threadwait.c.
15{
16 printf(
"Thread: Initialized\n");
18 printf(
"Thread: Terminating...\n");
19 return 0;
20}
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Referenced by main().