From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5926 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: sem_getvalue conformance considerations Date: Wed, 27 Aug 2014 14:43:33 +0400 (MSK) Message-ID: References: <20140827023338.GA21076@brightrain.aerifal.cx> <1409123141.4476.18.camel@eris.loria.fr> <20140827074310.GK12888@brightrain.aerifal.cx> 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 1409136329 13533 80.91.229.3 (27 Aug 2014 10:45:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 10:45:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5933-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 27 12:45:23 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XMajB-0006JJ-J6 for gllmg-musl@plane.gmane.org; Wed, 27 Aug 2014 12:45:21 +0200 Original-Received: (qmail 29933 invoked by uid 550); 27 Aug 2014 10:45:20 -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 29925 invoked from network); 27 Aug 2014 10:45:20 -0000 In-Reply-To: <20140827074310.GK12888@brightrain.aerifal.cx> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) Xref: news.gmane.org gmane.linux.lib.musl.general:5926 Archived-At: Why wouldn't the following design work? val[0] is sem value if >= 0, negated waiters count otherwise val[1] is wakeup count, incremented before futex wake, tested and decremented by waiters returning from futex wait Alexander