2002-07-26 14:45:50 +00:00
|
|
|
/* $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
|
|
|
|
|
2002-04-09 15:14:06 +00:00
|
|
|
/*
|
2009-01-27 22:34:36 +00:00
|
|
|
* Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
|
2012-02-10 17:29:53 -05:00
|
|
|
* Copyright 2007-2012 Niels Provos and Nick Mathewson
|
2002-04-09 15:14:06 +00:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2003-10-04 23:27:26 +00:00
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
2002-04-09 15:14:06 +00:00
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
2010-07-07 16:45:03 -04:00
|
|
|
#include "event2/event-config.h"
|
2011-01-02 08:43:45 -07:00
|
|
|
#include "evconfig-private.h"
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2012-02-29 15:07:31 -05:00
|
|
|
#ifdef EVENT__HAVE_SELECT
|
2012-02-08 18:46:00 +02:00
|
|
|
|
2011-07-05 00:36:09 -04:00
|
|
|
#ifdef __APPLE__
|
|
|
|
/* Apple wants us to define this if we might ever pass more than
|
|
|
|
* FD_SETSIZE bits to select(). */
|
|
|
|
#define _DARWIN_UNLIMITED_SELECT
|
|
|
|
#endif
|
|
|
|
|
2002-04-09 15:14:06 +00:00
|
|
|
#include <sys/types.h>
|
2012-02-29 15:07:31 -05:00
|
|
|
#ifdef EVENT__HAVE_SYS_TIME_H
|
2002-04-09 15:14:06 +00:00
|
|
|
#include <sys/time.h>
|
2002-10-07 00:47:34 +00:00
|
|
|
#endif
|
2012-02-29 15:07:31 -05:00
|
|
|
#ifdef EVENT__HAVE_SYS_SELECT_H
|
2007-07-31 00:25:22 +00:00
|
|
|
#include <sys/select.h>
|
|
|
|
#endif
|
2002-04-09 15:14:06 +00:00
|
|
|
#include <sys/queue.h>
|
2002-04-10 00:31:31 +00:00
|
|
|
#include <signal.h>
|
2002-04-09 15:14:06 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
2004-11-25 09:50:18 +00:00
|
|
|
#include "event-internal.h"
|
2009-01-13 20:26:37 +00:00
|
|
|
#include "evsignal-internal.h"
|
2009-10-21 03:54:00 +00:00
|
|
|
#include "event2/thread.h"
|
|
|
|
#include "evthread-internal.h"
|
2009-01-13 20:26:37 +00:00
|
|
|
#include "log-internal.h"
|
|
|
|
#include "evmap-internal.h"
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2012-02-29 15:07:31 -05:00
|
|
|
#ifndef EVENT__HAVE_FD_MASK
|
2009-09-23 23:51:26 +00:00
|
|
|
/* This type is mandatory, but Android doesn't define it. */
|
|
|
|
typedef unsigned long fd_mask;
|
|
|
|
#endif
|
|
|
|
|
2011-07-05 00:11:59 -04:00
|
|
|
#ifndef NFDBITS
|
|
|
|
#define NFDBITS (sizeof(fd_mask)*8)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Divide positive x by y, rounding up. */
|
|
|
|
#define DIV_ROUNDUP(x, y) (((x)+((y)-1))/(y))
|
|
|
|
|
|
|
|
/* How many bytes to allocate for N fds? */
|
|
|
|
#define SELECT_ALLOC_SIZE(n) \
|
|
|
|
(DIV_ROUNDUP(n, NFDBITS) * sizeof(fd_mask))
|
|
|
|
|
2002-04-09 15:14:06 +00:00
|
|
|
struct selectop {
|
|
|
|
int event_fds; /* Highest fd in fd set */
|
|
|
|
int event_fdsz;
|
2009-10-21 03:54:00 +00:00
|
|
|
int resize_out_sets;
|
2005-05-11 04:08:51 +00:00
|
|
|
fd_set *event_readset_in;
|
|
|
|
fd_set *event_writeset_in;
|
|
|
|
fd_set *event_readset_out;
|
|
|
|
fd_set *event_writeset_out;
|
2005-01-03 18:58:40 +00:00
|
|
|
};
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2010-03-05 13:00:15 -05:00
|
|
|
static void *select_init(struct event_base *);
|
2009-01-14 20:52:32 +00:00
|
|
|
static int select_add(struct event_base *, int, short old, short events, void*);
|
|
|
|
static int select_del(struct event_base *, int, short old, short events, void*);
|
2010-03-05 13:00:15 -05:00
|
|
|
static int select_dispatch(struct event_base *, struct timeval *);
|
|
|
|
static void select_dealloc(struct event_base *);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2003-09-25 03:26:53 +00:00
|
|
|
const struct eventop selectops = {
|
2002-04-09 15:14:06 +00:00
|
|
|
"select",
|
|
|
|
select_init,
|
|
|
|
select_add,
|
|
|
|
select_del,
|
2006-03-28 04:40:54 +00:00
|
|
|
select_dispatch,
|
2007-11-26 19:18:49 +00:00
|
|
|
select_dealloc,
|
2020-07-05 13:16:03 +03:00
|
|
|
1, /* need_reinit. */
|
2008-05-31 14:37:31 +00:00
|
|
|
EV_FEATURE_FDS,
|
2009-01-14 20:52:32 +00:00
|
|
|
0,
|
2002-04-09 15:14:06 +00:00
|
|
|
};
|
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
static int select_resize(struct selectop *sop, int fdsz);
|
2011-01-12 20:28:47 -05:00
|
|
|
static void select_free_selectop(struct selectop *sop);
|
2005-05-11 04:08:51 +00:00
|
|
|
|
2008-03-29 01:45:45 +00:00
|
|
|
static void *
|
2007-03-10 06:37:53 +00:00
|
|
|
select_init(struct event_base *base)
|
2002-04-09 15:14:06 +00:00
|
|
|
{
|
2005-01-03 18:58:40 +00:00
|
|
|
struct selectop *sop;
|
|
|
|
|
2008-04-25 01:18:08 +00:00
|
|
|
if (!(sop = mm_calloc(1, sizeof(struct selectop))))
|
2005-01-03 18:58:40 +00:00
|
|
|
return (NULL);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2011-07-05 00:11:59 -04:00
|
|
|
if (select_resize(sop, SELECT_ALLOC_SIZE(32 + 1))) {
|
2011-01-12 20:28:47 -05:00
|
|
|
select_free_selectop(sop);
|
2010-12-18 01:07:27 -02:00
|
|
|
return (NULL);
|
|
|
|
}
|
2005-05-11 04:08:51 +00:00
|
|
|
|
2022-10-25 11:30:34 +03:00
|
|
|
if (sigfd_init_(base) < 0)
|
|
|
|
evsig_init_(base);
|
2002-04-10 00:31:31 +00:00
|
|
|
|
2012-04-09 11:30:46 -04:00
|
|
|
evutil_weakrand_seed_(&base->weakrand_seed, 0);
|
|
|
|
|
2005-01-03 18:58:40 +00:00
|
|
|
return (sop);
|
2002-04-09 15:14:06 +00:00
|
|
|
}
|
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
#ifdef CHECK_INVARIANTS
|
|
|
|
static void
|
|
|
|
check_selectop(struct selectop *sop)
|
|
|
|
{
|
2008-12-23 16:37:01 +00:00
|
|
|
/* nothing to be done here */
|
2005-05-11 04:08:51 +00:00
|
|
|
}
|
|
|
|
#else
|
2007-02-28 04:29:18 +00:00
|
|
|
#define check_selectop(sop) do { (void) sop; } while (0)
|
2005-05-11 04:08:51 +00:00
|
|
|
#endif
|
|
|
|
|
2008-03-29 01:45:45 +00:00
|
|
|
static int
|
2008-12-23 16:37:01 +00:00
|
|
|
select_dispatch(struct event_base *base, struct timeval *tv)
|
2002-04-09 15:14:06 +00:00
|
|
|
{
|
2009-10-21 03:54:00 +00:00
|
|
|
int res=0, i, j, nfds;
|
2008-12-23 16:37:01 +00:00
|
|
|
struct selectop *sop = base->evbase;
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
2009-10-21 03:54:00 +00:00
|
|
|
if (sop->resize_out_sets) {
|
|
|
|
fd_set *readset_out=NULL, *writeset_out=NULL;
|
|
|
|
size_t sz = sop->event_fdsz;
|
|
|
|
if (!(readset_out = mm_realloc(sop->event_readset_out, sz)))
|
|
|
|
return (-1);
|
2011-01-07 13:18:09 -05:00
|
|
|
sop->event_readset_out = readset_out;
|
2009-10-21 03:54:00 +00:00
|
|
|
if (!(writeset_out = mm_realloc(sop->event_writeset_out, sz))) {
|
2011-01-07 13:18:09 -05:00
|
|
|
/* We don't free readset_out here, since it was
|
|
|
|
* already successfully reallocated. The next time
|
|
|
|
* we call select_dispatch, the realloc will be a
|
|
|
|
* no-op. */
|
2009-10-21 03:54:00 +00:00
|
|
|
return (-1);
|
|
|
|
}
|
|
|
|
sop->event_writeset_out = writeset_out;
|
|
|
|
sop->resize_out_sets = 0;
|
|
|
|
}
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
memcpy(sop->event_readset_out, sop->event_readset_in,
|
|
|
|
sop->event_fdsz);
|
|
|
|
memcpy(sop->event_writeset_out, sop->event_writeset_in,
|
|
|
|
sop->event_fdsz);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2009-10-21 03:54:00 +00:00
|
|
|
nfds = sop->event_fds+1;
|
|
|
|
|
2009-11-27 16:44:47 -05:00
|
|
|
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
2009-10-21 03:54:00 +00:00
|
|
|
|
|
|
|
res = select(nfds, sop->event_readset_out,
|
2005-05-11 04:08:51 +00:00
|
|
|
sop->event_writeset_out, NULL, tv);
|
2002-04-10 00:31:31 +00:00
|
|
|
|
2009-11-27 16:44:47 -05:00
|
|
|
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
|
2009-10-21 03:54:00 +00:00
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2002-04-10 00:31:31 +00:00
|
|
|
if (res == -1) {
|
2002-04-09 15:14:06 +00:00
|
|
|
if (errno != EINTR) {
|
2005-03-29 07:03:10 +00:00
|
|
|
event_warn("select");
|
2002-04-09 15:14:06 +00:00
|
|
|
return (-1);
|
|
|
|
}
|
2002-05-20 21:51:53 +00:00
|
|
|
|
2002-04-09 15:14:06 +00:00
|
|
|
return (0);
|
2007-03-10 06:37:53 +00:00
|
|
|
}
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2005-03-29 07:03:10 +00:00
|
|
|
event_debug(("%s: select reports %d", __func__, res));
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
2012-04-09 10:46:32 -04:00
|
|
|
i = evutil_weakrand_range_(&base->weakrand_seed, nfds);
|
2011-05-30 11:53:19 -04:00
|
|
|
for (j = 0; j < nfds; ++j) {
|
|
|
|
if (++i >= nfds)
|
2009-05-27 15:35:00 +00:00
|
|
|
i = 0;
|
2002-04-09 15:14:06 +00:00
|
|
|
res = 0;
|
2008-12-23 16:37:01 +00:00
|
|
|
if (FD_ISSET(i, sop->event_readset_out))
|
2002-04-09 15:14:06 +00:00
|
|
|
res |= EV_READ;
|
2008-12-23 16:37:01 +00:00
|
|
|
if (FD_ISSET(i, sop->event_writeset_out))
|
2002-04-09 15:14:06 +00:00
|
|
|
res |= EV_WRITE;
|
2008-12-23 16:37:01 +00:00
|
|
|
|
|
|
|
if (res == 0)
|
|
|
|
continue;
|
|
|
|
|
2012-02-29 15:07:33 -05:00
|
|
|
evmap_io_active_(base, i, res);
|
2002-04-09 15:14:06 +00:00
|
|
|
}
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
select_resize(struct selectop *sop, int fdsz)
|
|
|
|
{
|
|
|
|
fd_set *readset_in = NULL;
|
|
|
|
fd_set *writeset_in = NULL;
|
|
|
|
|
|
|
|
if (sop->event_readset_in)
|
|
|
|
check_selectop(sop);
|
|
|
|
|
2008-04-25 01:18:08 +00:00
|
|
|
if ((readset_in = mm_realloc(sop->event_readset_in, fdsz)) == NULL)
|
2005-05-11 04:08:51 +00:00
|
|
|
goto error;
|
|
|
|
sop->event_readset_in = readset_in;
|
2010-12-18 01:07:27 -02:00
|
|
|
if ((writeset_in = mm_realloc(sop->event_writeset_in, fdsz)) == NULL) {
|
2011-01-07 13:18:09 -05:00
|
|
|
/* Note that this will leave event_readset_in expanded.
|
|
|
|
* That's okay; we wouldn't want to free it, since that would
|
|
|
|
* change the semantics of select_resize from "expand the
|
|
|
|
* readset_in and writeset_in, or return -1" to "expand the
|
|
|
|
* *set_in members, or trash them and return -1."
|
|
|
|
*/
|
2005-05-11 04:08:51 +00:00
|
|
|
goto error;
|
2010-12-18 01:07:27 -02:00
|
|
|
}
|
2005-05-11 04:08:51 +00:00
|
|
|
sop->event_writeset_in = writeset_in;
|
2009-10-29 16:35:15 +00:00
|
|
|
sop->resize_out_sets = 1;
|
2005-05-11 04:08:51 +00:00
|
|
|
|
|
|
|
memset((char *)sop->event_readset_in + sop->event_fdsz, 0,
|
|
|
|
fdsz - sop->event_fdsz);
|
|
|
|
memset((char *)sop->event_writeset_in + sop->event_fdsz, 0,
|
|
|
|
fdsz - sop->event_fdsz);
|
|
|
|
|
|
|
|
sop->event_fdsz = fdsz;
|
|
|
|
check_selectop(sop);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
|
|
|
return (0);
|
2005-05-11 04:08:51 +00:00
|
|
|
|
|
|
|
error:
|
|
|
|
event_warn("malloc");
|
|
|
|
return (-1);
|
2002-04-09 15:14:06 +00:00
|
|
|
}
|
|
|
|
|
2005-05-11 04:08:51 +00:00
|
|
|
|
2008-03-29 01:45:45 +00:00
|
|
|
static int
|
2009-01-14 20:52:32 +00:00
|
|
|
select_add(struct event_base *base, int fd, short old, short events, void *p)
|
2002-04-09 15:14:06 +00:00
|
|
|
{
|
2008-12-23 16:37:01 +00:00
|
|
|
struct selectop *sop = base->evbase;
|
2009-01-14 20:52:32 +00:00
|
|
|
(void) p;
|
2002-04-10 00:31:31 +00:00
|
|
|
|
2009-10-26 20:00:43 +00:00
|
|
|
EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
|
|
|
/*
|
2002-04-09 15:14:06 +00:00
|
|
|
* Keep track of the highest fd, so that we can calculate the size
|
|
|
|
* of the fd_sets for select(2)
|
|
|
|
*/
|
2008-12-23 16:37:01 +00:00
|
|
|
if (sop->event_fds < fd) {
|
2005-05-11 04:08:51 +00:00
|
|
|
int fdsz = sop->event_fdsz;
|
|
|
|
|
2010-09-23 22:45:55 -04:00
|
|
|
if (fdsz < (int)sizeof(fd_mask))
|
|
|
|
fdsz = (int)sizeof(fd_mask);
|
2005-05-11 04:08:51 +00:00
|
|
|
|
2010-09-23 22:45:55 -04:00
|
|
|
/* In theory we should worry about overflow here. In
|
|
|
|
* reality, though, the highest fd on a unixy system will
|
|
|
|
* not overflow here. XXXX */
|
2011-07-05 00:11:59 -04:00
|
|
|
while (fdsz < (int) SELECT_ALLOC_SIZE(fd + 1))
|
2005-05-11 04:08:51 +00:00
|
|
|
fdsz *= 2;
|
|
|
|
|
|
|
|
if (fdsz != sop->event_fdsz) {
|
|
|
|
if (select_resize(sop, fdsz)) {
|
|
|
|
check_selectop(sop);
|
|
|
|
return (-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-23 16:37:01 +00:00
|
|
|
sop->event_fds = fd;
|
2005-05-11 04:08:51 +00:00
|
|
|
}
|
|
|
|
|
2008-12-23 16:37:01 +00:00
|
|
|
if (events & EV_READ)
|
|
|
|
FD_SET(fd, sop->event_readset_in);
|
|
|
|
if (events & EV_WRITE)
|
|
|
|
FD_SET(fd, sop->event_writeset_in);
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
2002-04-09 15:14:06 +00:00
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Nothing to be done here.
|
|
|
|
*/
|
|
|
|
|
2008-03-29 01:45:45 +00:00
|
|
|
static int
|
2009-01-14 20:52:32 +00:00
|
|
|
select_del(struct event_base *base, int fd, short old, short events, void *p)
|
2002-04-09 15:14:06 +00:00
|
|
|
{
|
2008-12-23 16:37:01 +00:00
|
|
|
struct selectop *sop = base->evbase;
|
2009-01-14 20:52:32 +00:00
|
|
|
(void)p;
|
2002-04-10 00:31:31 +00:00
|
|
|
|
2009-10-26 20:00:43 +00:00
|
|
|
EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
|
|
|
|
2008-12-23 16:37:01 +00:00
|
|
|
if (sop->event_fds < fd) {
|
2005-05-11 04:08:51 +00:00
|
|
|
check_selectop(sop);
|
2002-04-10 00:31:31 +00:00
|
|
|
return (0);
|
2005-05-11 04:08:51 +00:00
|
|
|
}
|
|
|
|
|
2008-12-23 16:37:01 +00:00
|
|
|
if (events & EV_READ)
|
|
|
|
FD_CLR(fd, sop->event_readset_in);
|
2002-04-10 00:31:31 +00:00
|
|
|
|
2008-12-23 16:37:01 +00:00
|
|
|
if (events & EV_WRITE)
|
|
|
|
FD_CLR(fd, sop->event_writeset_in);
|
2005-05-11 04:08:51 +00:00
|
|
|
|
|
|
|
check_selectop(sop);
|
|
|
|
return (0);
|
2002-04-10 00:31:31 +00:00
|
|
|
}
|
2006-03-28 04:40:54 +00:00
|
|
|
|
2008-03-29 01:45:45 +00:00
|
|
|
static void
|
2011-01-12 20:28:47 -05:00
|
|
|
select_free_selectop(struct selectop *sop)
|
2006-03-28 04:40:54 +00:00
|
|
|
{
|
|
|
|
if (sop->event_readset_in)
|
2008-04-25 01:18:08 +00:00
|
|
|
mm_free(sop->event_readset_in);
|
2006-03-28 04:40:54 +00:00
|
|
|
if (sop->event_writeset_in)
|
2008-04-25 01:18:08 +00:00
|
|
|
mm_free(sop->event_writeset_in);
|
2006-03-28 04:40:54 +00:00
|
|
|
if (sop->event_readset_out)
|
2008-04-25 01:18:08 +00:00
|
|
|
mm_free(sop->event_readset_out);
|
2006-03-28 04:40:54 +00:00
|
|
|
if (sop->event_writeset_out)
|
2008-04-25 01:18:08 +00:00
|
|
|
mm_free(sop->event_writeset_out);
|
2006-03-28 04:40:54 +00:00
|
|
|
|
|
|
|
memset(sop, 0, sizeof(struct selectop));
|
2008-04-25 01:18:08 +00:00
|
|
|
mm_free(sop);
|
2006-03-28 04:40:54 +00:00
|
|
|
}
|
2011-01-12 20:28:47 -05:00
|
|
|
|
|
|
|
static void
|
|
|
|
select_dealloc(struct event_base *base)
|
|
|
|
{
|
2012-02-29 15:07:33 -05:00
|
|
|
evsig_dealloc_(base);
|
2011-01-12 20:28:47 -05:00
|
|
|
|
|
|
|
select_free_selectop(base->evbase);
|
|
|
|
}
|
2012-02-08 18:46:00 +02:00
|
|
|
|
2012-02-29 15:07:31 -05:00
|
|
|
#endif /* EVENT__HAVE_SELECT */
|