Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230518145529.GW3630668@port70.net>
Date: Thu, 18 May 2023 16:55:29 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: 847567161 <847567161@...com>
Cc: musl <musl@...ts.openwall.com>
Subject: Re: Re:Re: Re: Question:Why musl call a_barrier in __pthread_once?

* 847567161 <847567161@...com> [2023-05-18 22:37:06 +0800]:
> &gt;  writes in init may not be visible when *control==2, without
> &gt;  the barrier. (there are many explanations on the web why
> &gt;  double-checked locking is wrong without an acquire barrier,
> &gt;  that's the same issue if you are interested in the details)
> 
> yes, can you show me the web?

https://preshing.com/20130930/double-checked-locking-is-fixed-in-cpp11/

this links to papers that explain why you need the barrier
in the fast path.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.