mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 19:43:31 +08:00
[NTOS]
- Implement PsGetCurrentThreadProcess, PsGetCurrentThreadProcessId and PsGetCurrentThreadTeb based on their non-current versions. - Fix PsGetThreadSessionId to call MmGetSessionId. - Fix the return value type of PsGetJobSessionId. - Remove an unneeded cast. svn path=/trunk/; revision=60296
This commit is contained in:
parent
575664c6f0
commit
26432ca94b
@ -963,11 +963,11 @@
|
||||
@ stdcall PsGetCurrentThread() KeGetCurrentThread
|
||||
@ stdcall PsGetCurrentThreadId()
|
||||
@ stdcall PsGetCurrentThreadPreviousMode()
|
||||
;PsGetCurrentThreadProcess
|
||||
;PsGetCurrentThreadProcessId
|
||||
@ stdcall PsGetCurrentThreadProcess()
|
||||
@ stdcall PsGetCurrentThreadProcessId()
|
||||
@ stdcall PsGetCurrentThreadStackBase()
|
||||
@ stdcall PsGetCurrentThreadStackLimit()
|
||||
;PsGetCurrentThreadTeb
|
||||
@ stdcall PsGetCurrentThreadTeb()
|
||||
@ stdcall PsGetCurrentThreadWin32Thread()
|
||||
;PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion
|
||||
@ stdcall PsGetJobLock(ptr)
|
||||
|
@ -527,12 +527,12 @@ PsGetJobLock ( PEJOB Job )
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PVOID
|
||||
ULONG
|
||||
NTAPI
|
||||
PsGetJobSessionId ( PEJOB Job )
|
||||
{
|
||||
ASSERT(Job);
|
||||
return (PVOID)Job->SessionId;
|
||||
return Job->SessionId;
|
||||
}
|
||||
|
||||
|
||||
|
@ -419,7 +419,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||
_SEH2_TRY
|
||||
{
|
||||
/* Write back the Session ID */
|
||||
SessionInfo->SessionId = PtrToUlong(PsGetProcessSessionId(Process));
|
||||
SessionInfo->SessionId = PsGetProcessSessionId(Process);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
|
@ -666,16 +666,6 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId,
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HANDLE
|
||||
NTAPI
|
||||
PsGetCurrentThreadId(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->Cid.UniqueThread;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
@ -706,6 +696,16 @@ PsGetThreadId(IN PETHREAD Thread)
|
||||
return Thread->Cid.UniqueThread;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HANDLE
|
||||
NTAPI
|
||||
PsGetCurrentThreadId(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->Cid.UniqueThread;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
@ -716,6 +716,16 @@ PsGetThreadProcess(IN PETHREAD Thread)
|
||||
return Thread->ThreadsProcess;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PEPROCESS
|
||||
NTAPI
|
||||
PsGetCurrentThreadProcess(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->ThreadsProcess;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
@ -731,9 +741,19 @@ PsGetThreadProcessId(IN PETHREAD Thread)
|
||||
*/
|
||||
HANDLE
|
||||
NTAPI
|
||||
PsGetCurrentThreadProcessId(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->Cid.UniqueProcess;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONG
|
||||
NTAPI
|
||||
PsGetThreadSessionId(IN PETHREAD Thread)
|
||||
{
|
||||
return (HANDLE)Thread->ThreadsProcess->Session;
|
||||
return MmGetSessionId(Thread->ThreadsProcess);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -746,6 +766,16 @@ PsGetThreadTeb(IN PETHREAD Thread)
|
||||
return Thread->Tcb.Teb;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PTEB
|
||||
NTAPI
|
||||
PsGetCurrentThreadTeb(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->Tcb.Teb;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
@ -756,6 +786,16 @@ PsGetThreadWin32Thread(IN PETHREAD Thread)
|
||||
return Thread->Tcb.Win32Thread;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PVOID
|
||||
NTAPI
|
||||
PsGetCurrentThreadWin32Thread(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->Tcb.Win32Thread;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
@ -827,16 +867,6 @@ PsSetThreadHardErrorsAreDisabled(IN PETHREAD Thread,
|
||||
Thread->HardErrorsAreDisabled = HardErrorsAreDisabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PVOID
|
||||
NTAPI
|
||||
PsGetCurrentThreadWin32Thread(VOID)
|
||||
{
|
||||
return PsGetCurrentThread()->Tcb.Win32Thread;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user