Takashi Yano via Cygwin writes:
> I found the cause. In pthread.h of cygwin, PTHREAD_ONCE_INIT is defined as:
> #define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
> however, libstdc++ initializes non-static pthread_once_t using this macro.

https://www.ibm.com/docs/en/aix/7.3?topic=p-pthread-once-init-macro
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_once.html

"The behavior of pthread_once() is undefined if once_control has
automatic storage duration or is not initialized by PTHREAD_ONCE_INIT."

> I cannot find the POSIX statement that only static pthread_once_t can be
> initialized using PTHREAD_ONCE_INIT. If I do not overlook something,
> this is the problem of cygwin side, isn't it?

You can initialize just about anything with PTHREAD_ONCE_INIT, but you
cannot expect the resulting structure to work as intended if there is
more than instance per library / program, so the libstdc++ object should
be a singleton, not automatic.

Still looks like ATWIL to me…


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to