[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: commit: ldap/servers/slapd main.c (init schema early)
Hallvard B Furuseth wrote:
I wrote:
>> main.c 1.208 -> 1.209 ITS#3917 init schema before parsing args
> Now slapd uses mutexes before calling ldap_pvt_thread_initialize().
Heh. The slap tools do that anyway, since they never call that
function. Which may mean it's harmless with the thread
implementations OpenLDAP supports,
Right. ldap_pvt_thread_initialize just calls ldap_int_thread_initialize
which is a no-op on the majority of implementations (except pth). It
then inits the thread pool (which is not used in tool mode). At any
rate, ldap_pvt_thread_initialize appears to be devoted to the required
setup for actually spawning threads, and doesn't have any effect on
setting up mutexes or any other locking primitives. Which makes sense;
if any of those primitives needed elaborate setup they wouldn't really
be "primitives" would they...
but in any case - is there any reason not to always call
ldap_pvt_thread_initialize() early, maybe just before main() checks
if argv[0] is a tool name?
I guess there's no harm in doing it. There's probably more in
slapcommon.c that we should factor out as well.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/