o Provide OpenSSL style support for multiple threads accessing the same event_base
o make event_rpcgen.py generate code include event-config.h; reported by Sam Banks.
o switch thread support so that locks get allocated as they are needed.
+ o make event methods static so that they are not exported; from Andrei Nigmatulin
Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
int nchanges;
};
-void *devpoll_init (struct event_base *);
-int devpoll_add (void *, struct event *);
-int devpoll_del (void *, struct event *);
-int devpoll_dispatch (struct event_base *, void *, struct timeval *);
-void devpoll_dealloc (struct event_base *, void *);
+static void *devpoll_init (struct event_base *);
+static int devpoll_add (void *, struct event *);
+static int devpoll_del (void *, struct event *);
+static int devpoll_dispatch (struct event_base *, void *, struct timeval *);
+static void devpoll_dealloc (struct event_base *, void *);
struct eventop devpollops = {
"devpoll",
return(0);
}
-void *
+static void *
devpoll_init(struct event_base *base)
{
int dpfd, nfiles = NEVENT;
return (devpollop);
}
-int
+static int
devpoll_recalc(struct event_base *base, void *arg, int max)
{
struct devpollop *devpollop = arg;
return (0);
}
-int
+static int
devpoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
struct devpollop *devpollop = arg;
}
-int
+static int
devpoll_add(void *arg, struct event *ev)
{
struct devpollop *devpollop = arg;
return (0);
}
-int
+static int
devpoll_del(void *arg, struct event *ev)
{
struct devpollop *devpollop = arg;
return (0);
}
-void
+static void
devpoll_dealloc(struct event_base *base, void *arg)
{
struct devpollop *devpollop = arg;
int epfd;
};
-void *epoll_init (struct event_base *);
-int epoll_add (void *, struct event *);
-int epoll_del (void *, struct event *);
-int epoll_dispatch (struct event_base *, void *, struct timeval *);
-void epoll_dealloc (struct event_base *, void *);
+static void *epoll_init (struct event_base *);
+static int epoll_add (void *, struct event *);
+static int epoll_del (void *, struct event *);
+static int epoll_dispatch (struct event_base *, void *, struct timeval *);
+static void epoll_dealloc (struct event_base *, void *);
struct eventop epollops = {
"epoll",
#define NEVENT 32000
-void *
+static void *
epoll_init(struct event_base *base)
{
int epfd, nfiles = NEVENT;
return (0);
}
-int
+static int
epoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
struct epollop *epollop = arg;
}
-int
+static int
epoll_add(void *arg, struct event *ev)
{
struct epollop *epollop = arg;
return (0);
}
-int
+static int
epoll_del(void *arg, struct event *ev)
{
struct epollop *epollop = arg;
return (0);
}
-void
+static void
epoll_dealloc(struct event_base *base, void *arg)
{
struct epollop *epollop = arg;
pid_t pid;
};
-void *kq_init (struct event_base *);
-int kq_add (void *, struct event *);
-int kq_del (void *, struct event *);
-int kq_dispatch (struct event_base *, void *, struct timeval *);
-int kq_insert (struct kqop *, struct kevent *);
-void kq_dealloc (struct event_base *, void *);
+static void *kq_init (struct event_base *);
+static int kq_add (void *, struct event *);
+static int kq_del (void *, struct event *);
+static int kq_dispatch (struct event_base *, void *, struct timeval *);
+static int kq_insert (struct kqop *, struct kevent *);
+static void kq_dealloc (struct event_base *, void *);
const struct eventop kqops = {
"kqueue",
1 /* need reinit */
};
-void *
+static void *
kq_init(struct event_base *base)
{
int kq;
return (kqueueop);
}
-int
+static int
kq_insert(struct kqop *kqop, struct kevent *kev)
{
int nevents = kqop->nevents;
/* Do nothing here */
}
-int
+static int
kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
struct kqop *kqop = arg;
}
-int
+static int
kq_add(void *arg, struct event *ev)
{
struct kqop *kqop = arg;
return (0);
}
-int
+static int
kq_del(void *arg, struct event *ev)
{
struct kqop *kqop = arg;
return (0);
}
-void
+static void
kq_dealloc(struct event_base *base, void *arg)
{
struct kqop *kqop = arg;
* "no entry." */
};
-void *poll_init (struct event_base *);
-int poll_add (void *, struct event *);
-int poll_del (void *, struct event *);
-int poll_dispatch (struct event_base *, void *, struct timeval *);
-void poll_dealloc (struct event_base *, void *);
+static void *poll_init (struct event_base *);
+static int poll_add (void *, struct event *);
+static int poll_del (void *, struct event *);
+static int poll_dispatch (struct event_base *, void *, struct timeval *);
+static void poll_dealloc (struct event_base *, void *);
const struct eventop pollops = {
"poll",
0
};
-void *
+static void *
poll_init(struct event_base *base)
{
struct pollop *pollop;
#define poll_check_ok(pop)
#endif
-int
+static int
poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
int res, i, msec = -1, nfds;
return (0);
}
-int
+static int
poll_add(void *arg, struct event *ev)
{
struct pollop *pop = arg;
* Nothing to be done here.
*/
-int
+static int
poll_del(void *arg, struct event *ev)
{
struct pollop *pop = arg;
return (0);
}
-void
+static void
poll_dealloc(struct event_base *base, void *arg)
{
struct pollop *pop = arg;
struct event **event_w_by_fd;
};
-void *select_init (struct event_base *);
-int select_add (void *, struct event *);
-int select_del (void *, struct event *);
-int select_dispatch (struct event_base *, void *, struct timeval *);
-void select_dealloc (struct event_base *, void *);
+static void *select_init (struct event_base *);
+static int select_add (void *, struct event *);
+static int select_del (void *, struct event *);
+static int select_dispatch (struct event_base *, void *, struct timeval *);
+static void select_dealloc (struct event_base *, void *);
const struct eventop selectops = {
"select",
static int select_resize(struct selectop *sop, int fdsz);
-void *
+static void *
select_init(struct event_base *base)
{
struct selectop *sop;
#define check_selectop(sop) do { (void) sop; } while (0)
#endif
-int
+static int
select_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
int res, i;
}
-int
+static int
select_add(void *arg, struct event *ev)
{
struct selectop *sop = arg;
* Nothing to be done here.
*/
-int
+static int
select_del(void *arg, struct event *ev)
{
struct selectop *sop = arg;
return (0);
}
-void
+static void
select_dealloc(struct event_base *base, void *arg)
{
struct selectop *sop = arg;