Commit 82860424 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Implement PsGetThreadId.

parent eb1146a5
......@@ -2598,6 +2598,14 @@ NTSTATUS WINAPI PsLookupThreadByThreadId( HANDLE threadid, PETHREAD *thread )
return status;
}
/*********************************************************************
* PsGetThreadId (NTOSKRNL.@)
*/
HANDLE WINAPI PsGetThreadId(PETHREAD thread)
{
TRACE( "%p -> %p\n", thread, thread->kthread.id.UniqueThread );
return thread->kthread.id.UniqueThread;
}
/***********************************************************************
* KeInsertQueue (NTOSKRNL.EXE.@)
......
......@@ -898,7 +898,7 @@
@ stdcall -arch=x86_64 PsGetProcessWow64Process(ptr)
@ stub PsGetThreadFreezeCount
@ stub PsGetThreadHardErrorsAreDisabled
@ stub PsGetThreadId
@ stdcall PsGetThreadId(ptr)
@ stub PsGetThreadProcess
@ stub PsGetThreadProcessId
@ stub PsGetThreadSessionId
......
......@@ -340,6 +340,7 @@ static void test_currentprocess(void)
ret = wait_single( thread, 0 );
ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
ok(PsGetThreadId((PETHREAD)KeGetCurrentThread()) == PsGetCurrentThreadId(), "thread IDs don't match\n");
ok(!PsIsSystemThread((PETHREAD)KeGetCurrentThread()), "unexpected system thread\n");
}
......
......@@ -217,6 +217,7 @@ NTSTATUS WINAPI KeExpandKernelStackAndCallout(PEXPAND_STACK_CALLOUT,void*,SIZE_
void WINAPI KeSetTargetProcessorDpc(PRKDPC,CCHAR);
BOOLEAN WINAPI MmIsAddressValid(void *);
HANDLE WINAPI PsGetProcessId(PEPROCESS);
HANDLE WINAPI PsGetThreadId(PETHREAD);
NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
void WINAPI RtlInitializeGenericTableAvl(PRTL_AVL_TABLE,PRTL_AVL_COMPARE_ROUTINE,PRTL_AVL_ALLOCATE_ROUTINE, PRTL_AVL_FREE_ROUTINE,void *);
void WINAPI RtlInsertElementGenericTableAvl(PRTL_AVL_TABLE,void *,ULONG,BOOL*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment