Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2002 11:35:47 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Daniel Eischen <eischen@pcnet1.pcnet.com>
Cc:        Doug Rabson <dfr@nlsystems.com>, current@FreeBSD.ORG
Subject:   Re: [PATCH: libc]Re: gnome on current
Message-ID:  <3DC03493.631E4405@mindspring.com>
References:  <Pine.GSO.4.10.10210300827570.16861-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DC03493.631E4405>