20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
21 |
* USA |
* USA |
22 |
* |
* |
23 |
* $Id: s_bsd_kqueue.c,v 1.45 2005/09/29 06:35:41 metalrock Exp $ |
* $Id$ |
24 |
*/ |
*/ |
25 |
|
|
26 |
#include "stdinc.h" |
#include "stdinc.h" |
27 |
|
#if USE_IOPOLL_MECHANISM == __IOPOLL_MECHANISM_KQUEUE |
28 |
#include <sys/event.h> |
#include <sys/event.h> |
29 |
#include "fdlist.h" |
#include "fdlist.h" |
30 |
#include "ircd.h" |
#include "ircd.h" |
83 |
|
|
84 |
EV_SET(kep, (uintptr_t) fd, (short) filter, what, 0, 0, NULL); |
EV_SET(kep, (uintptr_t) fd, (short) filter, what, 0, 0, NULL); |
85 |
|
|
86 |
if (kqoff == KE_LENGTH) |
if (++kqoff == KE_LENGTH) |
87 |
{ |
{ |
88 |
kevent(kqfd.fd, kq_fdlist, kqoff, NULL, 0, &zero_timespec); |
kevent(kqfd.fd, kq_fdlist, kqoff, NULL, 0, &zero_timespec); |
89 |
kqoff = 0; |
kqoff = 0; |
90 |
} |
} |
|
else |
|
|
kqoff++; |
|
91 |
} |
} |
92 |
|
|
93 |
/* |
/* |
196 |
comm_setselect(F, 0, NULL, NULL, 0); |
comm_setselect(F, 0, NULL, NULL, 0); |
197 |
} |
} |
198 |
} |
} |
199 |
|
#endif |