From 9b9ef5a2c0ec8e66c7da24c4229d89a90a10e914 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 11 Mar 2015 16:22:40 +0100 Subject: Bugfixing in progress. Strange bug: wait_on adds to waiters but later not in waiters. --- src/kernel/user/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/user/syscall.c') diff --git a/src/kernel/user/syscall.c b/src/kernel/user/syscall.c index 3a67350..606ab3f 100644 --- a/src/kernel/user/syscall.c +++ b/src/kernel/user/syscall.c @@ -311,7 +311,7 @@ static uint32_t select_sc(sc_args_t args) { bool ret = false; - int st = enter_critical(CL_NOSWITCH); + int st = enter_critical(CL_NOINT); while (true) { // ---- Poll FDs, if any is ok then return it @@ -328,10 +328,10 @@ static uint32_t select_sc(sc_args_t args) { uint64_t time = get_kernel_time(); - // ---- If none of the handles given is a valid handle, return false - if (n_wait_objs == 0) break; // ---- If any is ok, return true if (ret) break; + // ---- If none of the handles given is a valid handle, return false + if (n_wait_objs == 0) break; // ---- If the timeout is over, return false if (timeout >= 0 && time - select_begin_time >= (uint64_t)timeout) break; -- cgit v1.2.3