From owner-freebsd-current Wed Oct 30 11:37:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3B4937B401 for ; Wed, 30 Oct 2002 11:37:10 -0800 (PST) Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76EFE43E75 for ; Wed, 30 Oct 2002 11:37:10 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0422.cvx21-bradley.dialup.earthlink.net ([209.179.193.167] helo=mindspring.com) by swan.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 186yeF-0005cS-00; Wed, 30 Oct 2002 11:37:04 -0800 Message-ID: <3DC03493.631E4405@mindspring.com> Date: Wed, 30 Oct 2002 11:35:47 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen Cc: Doug Rabson , current@FreeBSD.ORG Subject: Re: [PATCH: libc]Re: gnome on current References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel Eischen wrote: > > That's bizarre... it's defined in libc_r, so there's no reason for > > the omission in libc. > > I only added stubs that I thought the implementation of libc used > (or would use). Makes sense. Actually, it looks like most of this could be done with macros, including the function definitions, so that we are just dealing with lists; I didn't go that far with it. > > Please find attached a patch that corrects this. > > Patch looks correct. Please commit? 8-). > > PS: It looks like the semaphore code use pthread_cond_signal; maybe it > > should be using the pthread_cond_broadcast, instead? This seeems to > > be broken, if we are talking a large vs. small count on the semaphore... > > Semaphores only increment/decrement the semaphore by 1. In the code in question, it looks like a "thundering herd" race is a correct thing to do to avoid starvation; maybe I'm reading it wrong. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message