[PATCH] tevent: First stab at a glib backend

Jelmer Vernooij jelmer at samba.org
Thu Jan 5 05:04:57 MST 2012


Hi Catalin,

Am 03/01/12 00:47, schrieb Catalin Patulea:
> Here is a glib backend for tevent. This backend lets single-threaded
> GTK apps embed parts of Samba which use tevent for I/O. These apps
> will also be able to make async calls into, say, smbclient-raw. In
> particular, this is the first step towards a Samba 4 backend for GVFS.
>
> fds and timers are mapped to the corresponding glib GSources, and the
> main loop is implemented using GMainContext. The dependency of tevent
> on glib is optional and auto-detected at configure time. The tevent
> ABI change was necessary to expose tevent_common_timed_destructor, and
> should not break anything.
>
> I have tested this using the test suite (waf test
> --tests=samba4.local.event), and the backend passes with comparable
> numbers of pipe events/sec as other backends (172492.00 ev/s for glib
> vs 178985.50 ev/s for poll).
>
> I have also tried forcing smbclient to use this backend
> (source4/lib/events/tevent_s4.c) and I was able to open a session to a
> share as guest (XP SP3 64-bit server), list the current directory, and
> download a file.
The changes look reasonable to me, but it would be nice if one of the 
tevent hackers could also have a look at it.

Cheers,

Jelmer


More information about the samba-technical mailing list