kern: KAutoObject destruction is now scheduled for next dpc-time

This commit is contained in:
Michael Scire authored and SciresM committed 2021-04-11 03:42:16 -07:00
1 parent 15956fcf9a
commit 4407237f5b
7 files changed
+94 -18

No files matched your search

@@ -74,12 +74,17 @@ namespace ams::kern::svc {
/* Wait for a message. */
while (true) {
/* Close any pending objects before we wait. */
GetCurrentThread().DestroyClosedObjects();
/* Wait for an object. */
s32 index;
Result result = KSynchronizationObject::Wait(std::addressof(index), objs, num_objects, timeout);
if (svc::ResultTimedOut::Includes(result)) {
return result;
}
/* Receive the request. */
if (R_SUCCEEDED(result)) {
KServerSession *session = objs[index]->DynamicCast<KServerSession *>();
if (session != nullptr) {