Set/query the priority of the requested thread, instead of the current one in KeQueryBasePriorityThread and KeSetBasePriorityThread
This commit is contained in:
parent
bf1483ae56
commit
4821a72b6f
|
@ -1379,7 +1379,7 @@ XBSYSAPI EXPORTNUM(124) xbox::long_xt NTAPI xbox::KeQueryBasePriorityThread
|
|||
KiLockDispatcherDatabase(&OldIrql);
|
||||
|
||||
// It cannot fail because all thread handles are created by ob
|
||||
const auto& nativeHandle = GetNativeHandle<true>(PspGetCurrentThread()->UniqueThread);
|
||||
const auto& nativeHandle = GetNativeHandle<true>(reinterpret_cast<PETHREAD>(Thread)->UniqueThread);
|
||||
long_xt ret = GetThreadPriority(*nativeHandle);
|
||||
|
||||
KiUnlockDispatcherDatabase(OldIrql);
|
||||
|
@ -1806,7 +1806,7 @@ XBSYSAPI EXPORTNUM(143) xbox::long_xt NTAPI xbox::KeSetBasePriorityThread
|
|||
KiLockDispatcherDatabase(&oldIRQL);
|
||||
|
||||
// It cannot fail because all thread handles are created by ob
|
||||
const auto &nativeHandle = GetNativeHandle<true>(PspGetCurrentThread()->UniqueThread);
|
||||
const auto &nativeHandle = GetNativeHandle<true>(reinterpret_cast<PETHREAD>(Thread)->UniqueThread);
|
||||
LONG ret = GetThreadPriority(*nativeHandle);
|
||||
|
||||
// This would work normally, but it will slow down the emulation,
|
||||
|
|
Loading…
Reference in New Issue