Manuel Teira wrote: [snip]
So, shouldn't we use different pthread_once_t variables for each of the initializers?
Absolutely, well spotted!
Even more interesting, how can this work on linux, for example?
I'd hazard a guess that on linux both attributes start off with all-0 values, all-0 is is the correct value for one of the two attributes, and by sheer dumb luck things are declared/linked in such an order that it's the other attribute that gets initialized first under the once_control.
