diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-11 16:22:40 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-11 16:22:40 +0100 |
commit | 9b9ef5a2c0ec8e66c7da24c4229d89a90a10e914 (patch) | |
tree | 471cb88f003eb58ce84342f2e7ab7effda04ce2d /src/kernel/user/syscall.c | |
parent | a7ff74cdf2835625282491242ede57b05ceaa782 (diff) | |
download | kogata-9b9ef5a2c0ec8e66c7da24c4229d89a90a10e914.tar.gz kogata-9b9ef5a2c0ec8e66c7da24c4229d89a90a10e914.zip |
Bugfixing in progress. Strange bug: wait_on adds to waiters but later not in waiters.
Diffstat (limited to 'src/kernel/user/syscall.c')
-rw-r--r-- | src/kernel/user/syscall.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |