From d26cdee0e912844fc2bcb596e6bf08b25d90899f Mon Sep 17 00:00:00 2001 From: cpasjuste Date: Wed, 9 Jan 2019 11:11:03 +0100 Subject: [PATCH] c11-threads: return thrd_timedout on cnd_timedwait timeout --- nx/source/runtime/c11-threads.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nx/source/runtime/c11-threads.c b/nx/source/runtime/c11-threads.c index d256750c..14c277c2 100644 --- a/nx/source/runtime/c11-threads.c +++ b/nx/source/runtime/c11-threads.c @@ -114,6 +114,10 @@ static int __cnd_timedwait(cnd_t *__restrict cond, mtx_t *__restrict mtx, u64 ti mtx->rmutex.counter = 1; } + if (rc == 0xEA01) { + return thrd_timedout; + } + return R_SUCCEEDED(rc) ? thrd_success : thrd_error; }