kernel: updated SyncRequest to take boolean thread wait result as a parameter

This commit is contained in:
bunnei 2014-05-26 22:12:46 -04:00
parent 6e51c56fe4
commit 58a3adcdd2
5 changed files with 33 additions and 10 deletions

View file

@ -92,11 +92,18 @@ Result ConnectToPort(void* out, const char* port_name) {
/// Synchronize to an OS service
Result SendSyncRequest(Handle handle) {
bool wait = false;
Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
DEBUG_LOG(SVC, "SendSyncRequest called handle=0x%08X");
_assert_msg_(KERNEL, object, "SendSyncRequest called, but kernel object is NULL!");
object->SyncRequest();
return 0;
Result res = object->SyncRequest(&wait);
if (wait) {
Kernel::WaitCurrentThread(WAITTYPE_SYNCH); // TODO(bunnei): Is this correct?
}
return res;
}
/// Close a handle