In order to guarantee single access to a function, the GNU C Library implements a call once function to ensure a function is only called once in the presence of multiple, potentially calling threads.
Preliminary: | MT-Safe | AS-Safe | AC-Safe | See POSIX Safety Concepts.
call_oncecalls function func exactly once, even if invoked from several threads. The completion of the function func synchronizes-with all previous or subsequent calls tocall_oncewith the sameflagvariable.