Displaying 2 results from an estimated 2 matches for "evbuf_size".
Did you mean:
buf_size
2005 Dec 14
2
Patch: ioloop using kqueue/kevent for FreeBSD
..."
+#include "ioloop-internal.h"
+
+#ifdef IOLOOP_KQUEUE
+
+#include <sys/types.h>
+#include <sys/event.h>
+#include <sys/time.h>
+
+#ifndef INITIAL_BUF_SIZE
+# define INITIAL_BUF_SIZE 128
+#endif
+
+
+struct ioloop_handler_context {
+ int kq;
+ size_t evbuf_size;
+ struct kevent *evbuf;
+
+ size_t fds_size;
+ struct fdrecord *fds;
+};
+
+struct fdrecord {
+ /* IO_READ | IO_WRITE | IO_ERROR */
+ unsigned char mode : 3;
+};
+
+
+void io_loop_handler_init(struct ioloop *ioloop)
+{
+ struct ioloop_handler_context *ctx;...
2005 Dec 15
2
Patch: More of kqueue() support.
..._KQUEUE
+#include <unistd.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
@@ -24,6 +25,8 @@
# define INITIAL_BUF_SIZE 128
#endif
+#define MASK (IO_READ | IO_WRITE | IO_ERROR)
+
struct ioloop_handler_context {
int kq;
size_t evbuf_size;
@@ -57,6 +60,7 @@ void io_loop_handler_init(struct ioloop
void io_loop_handler_deinit(struct ioloop *ioloop)
{
+ close(ioloop->handler_context->kq);
p_free(ioloop->pool, ioloop->handler_context->evbuf);
p_free(ioloop->pool, ioloop->handler_context...