forked from Bananymous/banan-os
Kernel: Allow SYS_PSELECT to work with timeout of zero
This commit is contained in:
parent
3823de6552
commit
4bf7a08c80
|
@ -1045,9 +1045,6 @@ namespace Kernel
|
||||||
int set_bits = 0;
|
int set_bits = 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (arguments->timeout && SystemTimer::get().ms_since_boot() >= timedout_ms)
|
|
||||||
break;
|
|
||||||
|
|
||||||
auto update_fds =
|
auto update_fds =
|
||||||
[&](int fd, fd_set* source, fd_set* dest, bool (Inode::*func)() const)
|
[&](int fd, fd_set* source, fd_set* dest, bool (Inode::*func)() const)
|
||||||
{
|
{
|
||||||
|
@ -1079,6 +1076,9 @@ namespace Kernel
|
||||||
if (set_bits > 0)
|
if (set_bits > 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (arguments->timeout && SystemTimer::get().ms_since_boot() >= timedout_ms)
|
||||||
|
break;
|
||||||
|
|
||||||
LockFreeGuard free(m_process_lock);
|
LockFreeGuard free(m_process_lock);
|
||||||
SystemTimer::get().sleep(1);
|
SystemTimer::get().sleep(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue