From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7343 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: Resuming work on new semaphore Date: Sun, 5 Apr 2015 17:17:35 +0300 (MSK) Message-ID: References: <20150402013006.GA1108@brightrain.aerifal.cx> <20150402152642.GW6817@brightrain.aerifal.cx> <20150402231457.GC6817@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 1428243470 8014 80.91.229.3 (5 Apr 2015 14:17:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Apr 2015 14:17:50 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7356-gllmg-musl=m.gmane.org@lists.openwall.com Sun Apr 05 16:17:49 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 1YelMz-0000P4-1E for gllmg-musl@m.gmane.org; Sun, 05 Apr 2015 16:17:49 +0200 Original-Received: (qmail 30278 invoked by uid 550); 5 Apr 2015 14:17:47 -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 30254 invoked from network); 5 Apr 2015 14:17:46 -0000 In-Reply-To: User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7343 Archived-At: In a similar vein, if the caller explicitely kills other waiters before invoking sem_post and sem_getvalue, it will also reveal an inconsistency with the new implementation: returned value of 0 will look as if sem_post has woken some waiters, even though the caller could know for certain that no tasks were waiting on the semaphore. Well we can make sem_getvalue return val[0]+val[1] instead... ;) Alexander