From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7120 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: semaphore redesign Date: Tue, 3 Mar 2015 01:40:37 +0300 (MSK) Message-ID: References: <20140827074310.GK12888@brightrain.aerifal.cx> <20150301173048.GD16260@port70.net> <20150301175009.GE16260@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: ger.gmane.org 1425336061 19870 80.91.229.3 (2 Mar 2015 22:41:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 22:41:01 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7133-gllmg-musl=m.gmane.org@lists.openwall.com Mon Mar 02 23:41:01 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YSZ1I-0000Os-If for gllmg-musl@m.gmane.org; Mon, 02 Mar 2015 23:41:00 +0100 Original-Received: (qmail 15936 invoked by uid 550); 2 Mar 2015 22:40:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15855 invoked from network); 2 Mar 2015 22:40:49 -0000 In-Reply-To: <20150301175009.GE16260@port70.net> User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7120 Archived-At: On Sun, 1 Mar 2015, Szabolcs Nagy wrote: > sorry > > the code is ok (applications cannot rely on the barrier in case of > failure), it can lead to surprising results if the application > uses relaxed atomics, but it's not a conformance issue There was some follow up on IRC with the conclusion, as I understood, that even though the rest of memory may be unsynchronized after returning an error, the memory holding the semaphore itself needs to be synchronized (otherwise the decision to return an error might have been based on stale memory). Does sem_getvalue need to synchronize memory as well? I think it should, but current implementation does not. Alexander