[Date Prev][Date Next] [Chronological] [Thread] [Top]

kqueue support for OpenLDAP (ITS#6300)



A long long time ago for a release that is now far far away, Apple submitted a patch adding kqueue support to OpenLDAP. I managed to track it down and have it working with some changes since the patch was originally written for OpenLDAP 2.3. In OpenLDAP master, it passed all tests with back-meta, back-ldap, back-meta backends along with the accesslog, syncprov, and rwm overlays. I think it generally is good to go in as a 2.5 feature. If anyone else would like to test it, they would need to run autoconf first to pick up the configure changes.

Branch is:
<https://github.com/quanah/openldap-scratch/tree/its6300>

Commits are:

<https://github.com/quanah/openldap-scratch/commit/d0c29a30c4cd7c0ab192d930109c348984354813>
<https://github.com/quanah/openldap-scratch/commit/7ebbf79a07e684696f75c912e92d435d8552d24e>

The only real changes are to servers/slapd/daemon.c, the rest are basically the header check & function check for configure.

The one bit I wasn't sure on is if the handling of SLAP_EVENT_IS_(READ|WRITE) in slapd_daemon_task is the best way to address that KQUEUE requires the thread id while event/poll do not (Starting around line 2942). If there's a better way to do this other than the ifdefs, let me know, and I'll update accordingly.

Thanks!

--Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>