diff options
author | Nicolas S. Dade <nic.dade@gmail.com> | 2015-12-18 19:39:19 -0800 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2015-12-22 14:32:50 +0100 |
commit | e3c3bf2b5801d0cc544e732fcee1ba51121051b3 (patch) | |
tree | ba569e54011048dc82264ffa1953a6293c90bd9d /libc/stdio/fread_unlocked.c | |
parent | f5bdd8ff82607e55a1c511e13e37a984408c8094 (diff) |
pselect: Use linux pselect syscall when available
Linux has a pselect syscall since 2.6.something. Using it
rather than emulating it with sigprocmask+select+sigprocmask
is smaller code, and works properly. (The emulation has
race conditions when unblocked signals arrive before or
after the select)
The tv.nsec >= 1E9 handling comes from uclibc's linux select()
implementation, which itself uses pselect() internally if the
pselect syscall exists. I though it would be good to do the
same here.
Note that although the libc pselect() API has 6 arguments,
the linux kernel syscall as 7 arguments. There is an extra,
somewhat vestigial, sizeof the signal mask argument.
Signed-off-by: Nicolas S. Dade <nic.dade@gmail.com>
Diffstat (limited to 'libc/stdio/fread_unlocked.c')
0 files changed, 0 insertions, 0 deletions