Thread (4 messages) 4 messages, 4 authors, 2016-10-27

Re: [PATCH] compat: Allow static initializer for pthreads on Windows

flat view

From: Junio C Hamano <hidden>
Date: 2016-10-27 06:33:10

Junio C Hamano [off-list ref] writes:
Johannes Sixt [off-list ref] writes:
quoted
quoted
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.


    
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help