From owner-freebsd-hackers Fri Nov 28 03:04:43 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA07792 for hackers-outgoing; Fri, 28 Nov 1997 03:04:43 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA07787 for ; Fri, 28 Nov 1997 03:04:37 -0800 (PST) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id DAA14169; Fri, 28 Nov 1997 03:07:25 -0800 (PST) Message-Id: <199711281107.DAA14169@implode.root.com> To: Marc Slemko cc: Charles Mott , hackers@FreeBSD.ORG Subject: Re: flock() question In-reply-to: Your message of "Thu, 27 Nov 1997 23:51:22 MST." From: David Greenman Reply-To: dg@root.com Date: Fri, 28 Nov 1997 03:07:25 -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Hmm. It looks like if you have multiple processes blocked on the >same lock in FreeBSD (well, 2.2 anyway), they are all woken up when >the lock is freed. Yes, only one will get the lock but they will >all be woken. Unless I am reading the code wrong... This is in >contrast to multiple processes blocking in accept(), where only >one will be woken up. The optimized wakeup case for accept() is that way because I optimized it. :-) You're probably right about flock(), but I haven't gotten around to looking at that and other potential wakeup optimizations. Changes like that have to be made with great care...what seems obvious often doesn't turn out that way. :-) -DG David Greenman Core-team/Principal Architect, The FreeBSD Project