bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/23424] gold doesn't build on Darwin


From: ccoutant at gmail dot com
Subject: [Bug gold/23424] gold doesn't build on Darwin
Date: Wed, 18 Jul 2018 03:34:31 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23424

--- Comment #2 from Cary Coutant <ccoutant at gmail dot com> ---
> It seems that using PTHREAD_ONCE_INIT can only be used in a static context, as
> documented in the man page (https://linux.die.net/man/3/pthread_once). Since
> it's POD, doing a deep copy with a statically initialized dummy should be a
> pragmatic workaround (see attached patch).

Can you point out where in that man page you found this? I've read
several man pages for pthread_once, and can't find any such
restriction on the use of PTHREAD_ONCE_INIT.

> Side note - the man page says that "The behavior of pthread_once() is 
> undefined
> if once_control has automatic storage duration", which might happen when using
> the Once class.

I'm pretty sure that all classes that derive from Once are allocated
either statically or with new. This shouldn't be an issue.

-cary

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]