This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: local equivalent for pthread_once() in glibc?


On 05/17/2017 04:51 PM, Adhemerval Zanella wrote:
> Right, but this is not seem the case for tunable where malloc_consolidate is
> called from ptmalloc_init (at least for main_arena).  In any case, I still
> think that for adequate __malloc_initialized access using C11 atomic since
> its access is still done concurrently (that why I asked if using __libc_once
> would be simpler).

I don't understand.  The concurrent access solely consists of reads.  We
do not use atomics in that case.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]