From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uctn9-0000wH-Nl for qemu-devel@nongnu.org; Thu, 16 May 2013 04:44:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uctn5-0003iB-4W for qemu-devel@nongnu.org; Thu, 16 May 2013 04:44:03 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:55584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uctn4-0003hv-Ms for qemu-devel@nongnu.org; Thu, 16 May 2013 04:43:58 -0400 Received: by mail-wg0-f41.google.com with SMTP id y10so5922896wgg.0 for ; Thu, 16 May 2013 01:43:57 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51949C46.8000001@redhat.com> Date: Thu, 16 May 2013 10:43:50 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368632937-32272-1-git-send-email-pbonzini@redhat.com> <1368632937-32272-9-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/12] qemu-thread: report RCU quiescent states List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Jan Kiszka , qemu-devel@nongnu.org, David Gibson Il 16/05/2013 10:33, liu ping fan ha scritto: >> > +Luckily, in most cases no manual annotation is needed, because waiting >> > +on condition variables (qemu_cond_wait), semaphores (qemu_sem_wait, >> > +qemu_sem_timedwait) or events (qemu_event_wait) implicitly marks the thread >> > +as quiescent for the whole duration of the wait. (There is an exception >> > +for semaphore waits with a zero timeout). >> > + > Why not the same rule for zero timeout? > Because they are not really doing synchronization, they are basically an "atomic_dec_if_not_zero" on the semaphore count. Paolo