mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 11:49:50 +00:00
* Optimize kevent() when it is called with a zero timeout.
(Credit: Eric Wong) git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@609 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
21f15f32e2
commit
a316fbb867
@ -1,6 +1,9 @@
|
||||
HEAD
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Optimize kevent() when it is called with a zero timeout.
|
||||
(Credit: Eric Wong)
|
||||
|
||||
* Avoid calling getsockopt() on file descriptors that are not sockets.
|
||||
(Credit: Eric Wong)
|
||||
|
||||
|
@ -121,7 +121,7 @@ linux_kevent_wait(
|
||||
int timeout, nret;
|
||||
|
||||
/* Use pselect() if the timeout value is less than one millisecond. */
|
||||
if (ts != NULL && ts->tv_sec == 0 && ts->tv_nsec < 1000000) {
|
||||
if (ts != NULL && ts->tv_sec == 0 && ts->tv_nsec > 0 && ts->tv_nsec < 1000000) {
|
||||
nret = linux_kevent_wait_hires(kq, ts);
|
||||
if (nret <= 0)
|
||||
return (nret);
|
||||
|
Loading…
Reference in New Issue
Block a user