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

Re: commit: ldap/servers/slapd main.c (init schema early)

Howard Chu writes:
> 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...

No idea.  I can imagine them needing to request kernel support
first, but since none of the supported variants seem to need that...
Actually I think I suggested it because it seemed to fit libldap_r,
not because of anything I know about threading.

>>  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.

Yes, slapcommon vs. main() is a bit confusing.  E.g. slap_tool_destroy
does ldap_pvt_tls_destroy() even though main does ldap_pvt_tls_init().