Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely.

This commit is contained in:
bunnei 2015-01-18 14:33:11 -05:00
parent c06d64528a
commit 9412996c8f
4 changed files with 59 additions and 20 deletions

View file

@ -210,7 +210,7 @@ void WaitCurrentThread_Sleep() {
ChangeThreadState(thread, ThreadStatus(THREADSTATUS_WAIT | (thread->status & THREADSTATUS_SUSPEND)));
}
void WaitCurrentThread_WaitSynchronization(WaitObject* wait_object, bool wait_all) {
void WaitCurrentThread_WaitSynchronization(SharedPtr<WaitObject> wait_object, bool wait_all) {
Thread* thread = GetCurrentThread();
thread->wait_all = wait_all;
thread->wait_address = 0;