ISO C 23, , and once_flag

2023-03-25 Thread Bruno Haible
In ISO C 23, - the type 'once_flag', - the macro ONCE_FLAG_INIT, - the declaration of function 'call_once' are all available from , not only from . 1) This makes it clear that often call_once is needed in an application without also needing mutexes. For this reason, I'm moving the 'call_once

Re: ISO C 23, , and once_flag

2023-03-25 Thread Jeffrey Walton
On Sat, Mar 25, 2023 at 5:05 PM Bruno Haible wrote: > > In ISO C 23, > - the type 'once_flag', > - the macro ONCE_FLAG_INIT, > - the declaration of function 'call_once' > are all available from , not only from . > > 1) This makes it clear that often call_once is needed in an application > wi

Re: ISO C 23, , and once_flag

2023-03-25 Thread Bruno Haible
effrey Walton wrote: > Be careful of call_once. > > Several years ago I cut over to C++11's call_once. The problem was, it > only worked reliably on 32-bit and 64-bit Intel platforms. It was a > disaster on Aarch64, PowerPC and Sparc. I had to back it out. > > The problems happened back when GCC