ntoskrnl.exe: Implement PsIsSystemThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1064e20a3f
commit
1c2d517242
|
@ -3056,6 +3056,15 @@ HANDLE WINAPI PsGetCurrentThreadId(void)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PsIsSystemThread (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
BOOLEAN WINAPI PsIsSystemThread(PETHREAD thread)
|
||||
{
|
||||
return thread->kthread.process == PsInitialSystemProcess;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PsGetVersion (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
|
|
|
@ -908,7 +908,7 @@
|
|||
@ stdcall PsImpersonateClient(ptr ptr long long long)
|
||||
@ extern PsInitialSystemProcess
|
||||
@ stub PsIsProcessBeingDebugged
|
||||
@ stub PsIsSystemThread
|
||||
@ stdcall PsIsSystemThread(ptr)
|
||||
@ stub PsIsThreadImpersonating
|
||||
@ stub PsIsThreadTerminating
|
||||
@ stub PsJobType
|
||||
|
|
|
@ -39,6 +39,11 @@ struct _KTHREAD
|
|||
CLIENT_ID id;
|
||||
};
|
||||
|
||||
struct _ETHREAD
|
||||
{
|
||||
struct _KTHREAD kthread;
|
||||
};
|
||||
|
||||
void *alloc_kernel_object( POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG ref ) DECLSPEC_HIDDEN;
|
||||
HANDLE kernel_object_handle( void *obj, unsigned int access ) DECLSPEC_HIDDEN;
|
||||
NTSTATUS kernel_object_from_handle( HANDLE handle, POBJECT_TYPE type, void **ret ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -337,6 +337,8 @@ static void test_currentprocess(void)
|
|||
thread = PsGetCurrentThread();
|
||||
ret = wait_single( thread, 0 );
|
||||
ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
|
||||
ok(!PsIsSystemThread((PETHREAD)KeGetCurrentThread()), "unexpected system thread\n");
|
||||
}
|
||||
|
||||
static void sleep(void)
|
||||
|
|
|
@ -131,6 +131,7 @@ typedef struct _FS_FILTER_CALLBACKS
|
|||
|
||||
BOOLEAN WINAPI FsRtlIsNameInExpression(PUNICODE_STRING, PUNICODE_STRING, BOOLEAN, PWCH);
|
||||
NTSTATUS WINAPI ObQueryNameString(PVOID,POBJECT_NAME_INFORMATION,ULONG,PULONG);
|
||||
BOOLEAN WINAPI PsIsSystemThread(PETHREAD);
|
||||
NTSTATUS WINAPI PsLookupProcessByProcessId(HANDLE,PEPROCESS*);
|
||||
NTSTATUS WINAPI PsLookupThreadByThreadId(HANDLE,PETHREAD*);
|
||||
void WINAPI PsRevertToSelf(void);
|
||||
|
|
Loading…
Reference in New Issue