On Sat, Apr 12, 2025 at 02:36:57AM +, Taylor R Campbell wrote:
> Proposal:
>
>Make pthread_once mutually exclusive with fork -- mainly at the
>cost of one leaf function call and two predicted-not-taken
>conditional branches in fork, plus a little more private coupling
>between
tl;dr -- pthread_once can't satisfy its contract to call a function
_once_ if concurrent fork is allowed, even though that would be
useful, e.g. for lazy initialization of arc4random state.
Proposal:
Make pthread_once mutually exclusive with fork -- mainly at the
cost of one leaf function c