mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
libc: fix returned timeout-left value
If the suspend method for the main thread detects that the suspend condition is false it must return the passed timeout value (not always 0). Otherwise, the caller may incorrectly assume the timeout expired.
This commit is contained in:
parent
2a94f8cdb4
commit
43719b5fd1
@ -291,7 +291,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler,
|
||||
}
|
||||
|
||||
if (!check.suspend() && !_kernel_routine)
|
||||
return 0;
|
||||
return timeout_ms;
|
||||
|
||||
if (timeout_ms > 0)
|
||||
_main_timeout.timeout(timeout_ms);
|
||||
|
Loading…
Reference in New Issue
Block a user