EXPERIMENTAL: tevent_kqueue support

Richard Sharpe realrichardsharpe at gmail.com
Mon Feb 18 16:40:23 MST 2013


On Sun, Feb 17, 2013 at 8:07 AM, Stefan (metze) Metzmacher
<metze at samba.org> wrote:
> Hi Timur,
>
> I've started with a tevent_kqueue implementation
> (just looking at the man page).
>
> It compiles for me on linux with the 2nd HACK patch.
>
> Can you have a look and test it?
>
> @Jeremy: we may want to pick up some of the simplified logic into the
> epoll backend:
>          kqueue_update_fd_event() instead of
>          epoll_add_event/epoll_mod_event/epoll_del_event/epoll_change_event.
>
> I'm also thinking about having a fallback handler in the kqueue backend
> and use it if available from the standard backend.

OK, this failed on FreeBSD 8.0 for two reasons:

1. Need some include files.

-bash-4.0$ diff -up lib/tevent/tevent_kqueue.c.orig lib/tevent/tevent_kqueue.c
--- lib/tevent/tevent_kqueue.c.orig     2013-02-18 23:23:38.049899845 -0800
+++ lib/tevent/tevent_kqueue.c  2013-02-18 23:24:16.258133294 -0800
@@ -29,6 +29,9 @@
 #include "tevent.h"
 #include "tevent_internal.h"
 #include "tevent_util.h"
+#include <sys/types.h>
+#include <sys/event.h>
+#include <sys/time.h>

 struct kqueue_event_context {
        struct tevent_context *ev;


2. A weird error

[3743/3985] abi_check: bin/default/librpc/libndr.so
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/logging/__init__.py", line 773, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position
389: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/logging/__init__.py", line 773, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position
357: ordinal not in range(128)
Waf: Leaving directory `/home/rsharpe/panzura-samba-master/bin'
Build failed: ABI for libndr.so has changed - please fix library
version then build with --abi-update
See http://wiki.samba.org/index.php/Waf#ABI_Checking for more information
If you have not changed any ABI, and your platform always gives this
error, please configure with --abi-check-disable to skip this check
make: *** [all] Error 1

I don't know about this second error before. I don't think I have seen
it. Checking a build without the kqueue stuff now.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list