[Date Prev][Date Next]
Re: (ITS#8638) Recursive mutex in libldap_r
>> IMO using recursive mutexes means your code is broken. We introduced these for
>> accesslog.c but in fact we could avoid them at zero cost. Also I don't see the
>> relevance of libevent to this discussion. We use our own event mechanism and
>> it is more efficient than libevent.
> libevent is a dependency for the load balancer that I intend to propose
> for integration into the project after all the relevant dependencies
> have come in.
> There is a new version of this patch that provides an implementation on
> each platform or defers to the existing one (as per each platform's
> documentation). Untested except on POSIX and most of them seem pretty
> arcane anyway.
It looks like glibc still doesn't define PTHREAD_MUTEX_RECURSIVE by default,
it requires compiling with either -D_GNU_SOURCE or -D_XOPEN_SOURCE. The
feature itself appears to be part of UNIX98. It's likely that all pthread
implementations available today support it, but it still seems a bit iffy.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/