Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 26 Sep 2002 00:35:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 26 Sep 2002 00:35:26 -0400 Received: from pizda.ninka.net ([216.101.162.242]:3715 "EHLO pizda.ninka.net") by vger.kernel.org with ESMTP id ; Thu, 26 Sep 2002 00:35:25 -0400 Date: Wed, 25 Sep 2002 21:34:27 -0700 (PDT) Message-Id: <20020925.213427.116352583.davem@redhat.com> To: torvalds@transmeta.com Cc: akpm@digeo.com, linux-kernel@vger.kernel.org Subject: Re: [patch 1/4] prepare_to_wait/finish_wait sleep/wakeup API From: "David S. Miller" In-Reply-To: References: <20020925.212459.118951005.davem@redhat.com> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 797 Lines: 20 From: Linus Torvalds Date: Wed, 25 Sep 2002 21:37:23 -0700 (PDT) On Wed, 25 Sep 2002, David S. Miller wrote: > For example, the ordering of the test and add/remove from > the wait queue is pretty important. The test and add yes. Remove no, since remove is always done after we know we're waking up. Ok, so if the condition retest fails at wakeup (someone got to the event before us), it's ok because we add ourselves back to the wait queue first, mark ourselves as sleeping, _then_ retest. Right? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/