Add implementation for NtWaitForSingleObject & stub for KeSetPriorityThread
This commit is contained in:
parent
9fedcc64a6
commit
9f7b29ad62
|
@ -340,6 +340,24 @@ XBSYSAPI EXPORTNUM(143) xboxkrnl::LONG NTAPI xboxkrnl::KeSetBasePriorityThread
|
||||||
RETURN(1);
|
RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * 0x0096 - KeSetPriorityThread
|
||||||
|
// ******************************************************************
|
||||||
|
XBSYSAPI EXPORTNUM(148) xboxkrnl::BOOLEAN NTAPI xboxkrnl::KeSetPriorityThread
|
||||||
|
(
|
||||||
|
IN PKTHREAD Thread,
|
||||||
|
IN PVOID Priority
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LOG_FUNC_BEGIN
|
||||||
|
LOG_FUNC_ARG_OUT(Thread)
|
||||||
|
LOG_FUNC_ARG_OUT(Priority)
|
||||||
|
LOG_FUNC_END;
|
||||||
|
|
||||||
|
LOG_UNIMPLEMENTED();
|
||||||
|
|
||||||
|
RETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * 0x0095 - KeSetTimer
|
// * 0x0095 - KeSetTimer
|
||||||
|
|
|
@ -2255,6 +2255,41 @@ XBSYSAPI EXPORTNUM(232) VOID NTAPI xboxkrnl::NtUserIoApcDispatcher
|
||||||
DbgPrintf("EmuKrnl (0x%X): NtUserIoApcDispatcher Completed\n", GetCurrentThreadId());
|
DbgPrintf("EmuKrnl (0x%X): NtUserIoApcDispatcher Completed\n", GetCurrentThreadId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * 0x00E9 - NtWaitForSingleObject
|
||||||
|
// ******************************************************************
|
||||||
|
XBSYSAPI EXPORTNUM(233) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtWaitForSingleObject
|
||||||
|
(
|
||||||
|
IN HANDLE Handle,
|
||||||
|
IN BOOLEAN Alertable,
|
||||||
|
IN PVOID Timeout
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LOG_FUNC_BEGIN
|
||||||
|
LOG_FUNC_ARG(Handle)
|
||||||
|
LOG_FUNC_ARG(Alertable)
|
||||||
|
LOG_FUNC_ARG(Timeout)
|
||||||
|
LOG_FUNC_END;
|
||||||
|
|
||||||
|
NTSTATUS ret;
|
||||||
|
|
||||||
|
if (IsEmuHandle(Handle))
|
||||||
|
{
|
||||||
|
ret = WAIT_FAILED;
|
||||||
|
EmuWarning("WaitFor EmuHandle not supported!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = NtDll::NtWaitForSingleObject(Handle, Alertable, (NtDll::PLARGE_INTEGER)Timeout);
|
||||||
|
DbgPrintf("Finished waiting for 0x%.08X\n", Handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret == WAIT_FAILED)
|
||||||
|
EmuWarning("NtWaitForSingleObject failed! (%s)", NtStatusToString(ret));
|
||||||
|
|
||||||
|
RETURN(ret);
|
||||||
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * 0x00EA - NtWaitForSingleObjectEx
|
// * 0x00EA - NtWaitForSingleObjectEx
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
|
@ -212,7 +212,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[379] =
|
||||||
(uint32)PANIC(0x0091), // 0x0091 (145) KeSetEvent
|
(uint32)PANIC(0x0091), // 0x0091 (145) KeSetEvent
|
||||||
(uint32)PANIC(0x0092), // 0x0092 (146) KeSetEventBoostPriority
|
(uint32)PANIC(0x0092), // 0x0092 (146) KeSetEventBoostPriority
|
||||||
(uint32)PANIC(0x0093), // 0x0093 (147) KeSetPriorityProcess
|
(uint32)PANIC(0x0093), // 0x0093 (147) KeSetPriorityProcess
|
||||||
(uint32)PANIC(0x0094), // 0x0094 (148) KeSetPriorityThread
|
(uint32)FUNC(&xboxkrnl::KeSetPriorityThread), // 0x0094 (148)
|
||||||
(uint32)FUNC(&xboxkrnl::KeSetTimer), // 0x0095 (149)
|
(uint32)FUNC(&xboxkrnl::KeSetTimer), // 0x0095 (149)
|
||||||
(uint32)FUNC(&xboxkrnl::KeSetTimerEx), // 0x0096 (150)
|
(uint32)FUNC(&xboxkrnl::KeSetTimerEx), // 0x0096 (150)
|
||||||
(uint32)PANIC(0x0097), // 0x0097 (151) KeStallExecutionProcessor
|
(uint32)PANIC(0x0097), // 0x0097 (151) KeStallExecutionProcessor
|
||||||
|
@ -297,7 +297,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[379] =
|
||||||
(uint32)PANIC(0x00E6), // 0x00E6 (230) NtSignalAndWaitForSingleObjectEx
|
(uint32)PANIC(0x00E6), // 0x00E6 (230) NtSignalAndWaitForSingleObjectEx
|
||||||
(uint32)FUNC(&xboxkrnl::NtSuspendThread), // 0x00E7 (231)
|
(uint32)FUNC(&xboxkrnl::NtSuspendThread), // 0x00E7 (231)
|
||||||
(uint32)FUNC(&xboxkrnl::NtUserIoApcDispatcher), // 0x00E8 (232)
|
(uint32)FUNC(&xboxkrnl::NtUserIoApcDispatcher), // 0x00E8 (232)
|
||||||
(uint32)PANIC(0x00E9), // 0x00E9 (233) NtWaitForSingleObject
|
(uint32)FUNC(&xboxkrnl::NtWaitForSingleObject), // 0x00E9 (233)
|
||||||
(uint32)FUNC(&xboxkrnl::NtWaitForSingleObjectEx), // 0x00EA (234)
|
(uint32)FUNC(&xboxkrnl::NtWaitForSingleObjectEx), // 0x00EA (234)
|
||||||
(uint32)FUNC(&xboxkrnl::NtWaitForMultipleObjectsEx), // 0x00EB (235)
|
(uint32)FUNC(&xboxkrnl::NtWaitForMultipleObjectsEx), // 0x00EB (235)
|
||||||
(uint32)FUNC(&xboxkrnl::NtWriteFile), // 0x00EC (236)
|
(uint32)FUNC(&xboxkrnl::NtWriteFile), // 0x00EC (236)
|
||||||
|
|
Loading…
Reference in New Issue