Junio C Hamano <[email protected]> writes:
> Johannes Sixt <[email protected]> writes:
>
>>> As many codepaths may not even need access to the attributes, I
>>> doubt that would be a very productive direction to go.
>>
>> So, what is productive then? Pessimizing one (not exactly minor) platform?
>
> Lazy on-demand initialization as needed, perhaps? The on-demand
> initialization mechanism may become no-op on some platforms that can
> do static initialization.
Ah, I think I misunderstood your "please rewrite". Did you mean to
add "void attr_start(void)" helper function to attr.c that does
series of pthread_mutex_init() calls as needed? That function can
be called from main() of platforms that cannot statically initialize
mutices, while on other platforms it can be a no-op as long as the
variables are statically initialized? If so, that would not pessimize
any platform, I would think.