From owner-cvs-src@FreeBSD.ORG Tue Feb 27 23:58:44 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EE1416B203; Tue, 27 Feb 2007 23:58:44 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 7AADE13C481; Tue, 27 Feb 2007 23:58:44 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 5E91D1A3C1C; Tue, 27 Feb 2007 15:58:44 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id AEB1E515B2; Tue, 27 Feb 2007 18:58:43 -0500 (EST) Date: Tue, 27 Feb 2007 18:58:43 -0500 From: Kris Kennaway To: Greg Lehey Message-ID: <20070227235843.GA59138@xor.obsecurity.org> References: <200702272309.l1RN9Xum011236@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <200702272309.l1RN9Xum011236@repoman.freebsd.org> User-Agent: Mutt/1.4.2.2i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 sleep.9 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 23:58:44 -0000 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 27, 2007 at 11:09:32PM +0000, Greg Lehey wrote: > - the issues with wakeup_one are due to address space clashes between > unrelated groups of threads. > | -function > | -does not work reliably if more than one thread is sleeping on the same address; > | -in this case it is possible for an unrelated thread to be woken. > | -This thread will ignore the wakeup, and the correct process will never be > | -woken. > | +function does not work reliably if unrelated threads are sleeping on the same > | +address. > | +In this case, if a wakeup for one group of threads is delivered to a member of > | +another group, that thread will ignore the wakeup, and the correct thread will > | +never be woken up. > | +It is the programmer's responsibility to choose a unique > | +.Fa chan > | +value. > | +In case of doubt, do not use > | +.Fn wakeup_one . I don't like this recommendation, since it directs the programmer to introduce potentially serious performance bottlenecks at the expense of clear thinking about their code to avoid introducing the bug in the first place. Kris --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF5MWzWry0BWjoQKURApMsAKDQsIOQA4j7Fz2VyQmvSeMMiWYAiQCg0QFE nr9U1eWEjmzz1298NcIC8zg= =O09G -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3--