From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu2lU-0003df-9X for qemu-devel@nongnu.org; Tue, 02 Jul 2013 11:45:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uu2lQ-0004vo-Hl for qemu-devel@nongnu.org; Tue, 02 Jul 2013 11:45:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu2lQ-0004vP-8v for qemu-devel@nongnu.org; Tue, 02 Jul 2013 11:45:08 -0400 Message-ID: <51D2F60F.1020103@redhat.com> Date: Tue, 02 Jul 2013 17:47:27 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <130703002742.M0121797@mirage.ceres.dti.ne.jp> In-Reply-To: <130703002742.M0121797@mirage.ceres.dti.ne.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] semaphore: fix a hangup problem under loadon NetBSD hosts. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Izumi Tsutsui Cc: qemu-devel@nongnu.org On 07/02/13 17:27, Izumi Tsutsui wrote: > Laszlo Ersek wrote: >> Conversely, the only time we need to send a signal is the 0->1 count >> transition (*). > > Per comments from Soda, signals could be required even on count >0, > if more than one threads are sleeping in qemu_cond_timedwait(), > and more than one qemu_sem_post() are called at once, then > the second qemu_sem_post() gets the mutex before sleeping threads > in qemu_sem_timedwait(). You're right. Laszlo