mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:31:40 +00: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
4 changed files with 57 additions and 27 deletions
|
@ -963,11 +963,11 @@
|
||||||
@ stdcall PsGetCurrentThread() KeGetCurrentThread
|
@ stdcall PsGetCurrentThread() KeGetCurrentThread
|
||||||
@ stdcall PsGetCurrentThreadId()
|
@ stdcall PsGetCurrentThreadId()
|
||||||
@ stdcall PsGetCurrentThreadPreviousMode()
|
@ stdcall PsGetCurrentThreadPreviousMode()
|
||||||
;PsGetCurrentThreadProcess
|
@ stdcall PsGetCurrentThreadProcess()
|
||||||
;PsGetCurrentThreadProcessId
|
@ stdcall PsGetCurrentThreadProcessId()
|
||||||
@ stdcall PsGetCurrentThreadStackBase()
|
@ stdcall PsGetCurrentThreadStackBase()
|
||||||
@ stdcall PsGetCurrentThreadStackLimit()
|
@ stdcall PsGetCurrentThreadStackLimit()
|
||||||
;PsGetCurrentThreadTeb
|
@ stdcall PsGetCurrentThreadTeb()
|
||||||
@ stdcall PsGetCurrentThreadWin32Thread()
|
@ stdcall PsGetCurrentThreadWin32Thread()
|
||||||
;PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion
|
;PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion
|
||||||
@ stdcall PsGetJobLock(ptr)
|
@ stdcall PsGetJobLock(ptr)
|
||||||
|
|
|
@ -527,12 +527,12 @@ PsGetJobLock ( PEJOB Job )
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
PVOID
|
ULONG
|
||||||
NTAPI
|
NTAPI
|
||||||
PsGetJobSessionId ( PEJOB Job )
|
PsGetJobSessionId ( PEJOB Job )
|
||||||
{
|
{
|
||||||
ASSERT(Job);
|
ASSERT(Job);
|
||||||
return (PVOID)Job->SessionId;
|
return Job->SessionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -419,7 +419,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
/* Write back the Session ID */
|
/* Write back the Session ID */
|
||||||
SessionInfo->SessionId = PtrToUlong(PsGetProcessSessionId(Process));
|
SessionInfo->SessionId = PsGetProcessSessionId(Process);
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
|
|
|
@ -666,16 +666,6 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
HANDLE
|
|
||||||
NTAPI
|
|
||||||
PsGetCurrentThreadId(VOID)
|
|
||||||
{
|
|
||||||
return PsGetCurrentThread()->Cid.UniqueThread;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -706,6 +696,16 @@ PsGetThreadId(IN PETHREAD Thread)
|
||||||
return Thread->Cid.UniqueThread;
|
return Thread->Cid.UniqueThread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
HANDLE
|
||||||
|
NTAPI
|
||||||
|
PsGetCurrentThreadId(VOID)
|
||||||
|
{
|
||||||
|
return PsGetCurrentThread()->Cid.UniqueThread;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -716,6 +716,16 @@ PsGetThreadProcess(IN PETHREAD Thread)
|
||||||
return Thread->ThreadsProcess;
|
return Thread->ThreadsProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
PEPROCESS
|
||||||
|
NTAPI
|
||||||
|
PsGetCurrentThreadProcess(VOID)
|
||||||
|
{
|
||||||
|
return PsGetCurrentThread()->ThreadsProcess;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -731,9 +741,19 @@ PsGetThreadProcessId(IN PETHREAD Thread)
|
||||||
*/
|
*/
|
||||||
HANDLE
|
HANDLE
|
||||||
NTAPI
|
NTAPI
|
||||||
|
PsGetCurrentThreadProcessId(VOID)
|
||||||
|
{
|
||||||
|
return PsGetCurrentThread()->Cid.UniqueProcess;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
ULONG
|
||||||
|
NTAPI
|
||||||
PsGetThreadSessionId(IN PETHREAD Thread)
|
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;
|
return Thread->Tcb.Teb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
PTEB
|
||||||
|
NTAPI
|
||||||
|
PsGetCurrentThreadTeb(VOID)
|
||||||
|
{
|
||||||
|
return PsGetCurrentThread()->Tcb.Teb;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -756,6 +786,16 @@ PsGetThreadWin32Thread(IN PETHREAD Thread)
|
||||||
return Thread->Tcb.Win32Thread;
|
return Thread->Tcb.Win32Thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
PsGetCurrentThreadWin32Thread(VOID)
|
||||||
|
{
|
||||||
|
return PsGetCurrentThread()->Tcb.Win32Thread;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -827,16 +867,6 @@ PsSetThreadHardErrorsAreDisabled(IN PETHREAD Thread,
|
||||||
Thread->HardErrorsAreDisabled = HardErrorsAreDisabled;
|
Thread->HardErrorsAreDisabled = HardErrorsAreDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
PVOID
|
|
||||||
NTAPI
|
|
||||||
PsGetCurrentThreadWin32Thread(VOID)
|
|
||||||
{
|
|
||||||
return PsGetCurrentThread()->Tcb.Win32Thread;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue