Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 1998 11:45:50 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        lists@tar.com, tejblum@arc.hq.cti.ru
Cc:        current@FreeBSD.ORG, info@highwind.com
Subject:   Re: Another Serious libc_r problem
Message-ID:  <199810201545.LAA21709@pcnet1.pcnet.com>

next in thread | raw e-mail | index | archive | help
Dmitrij Tejblum <tejblum@arc.hq.cti.ru> wrote:
> > On Tue, 20 Oct 98 08:01:12 -0500, Richard Seaman, Jr. wrote:
> > 
> > >I will try to look at this later, if I have time.  However, there are
> > >others who know a lot more about this than I do who could probably
> > >do a better fix.
> > 
> > You could try the following patch.  However, someone else should look at
> > it too before its committed.
> 
> Heh. I was just about post a very similar patch when received your posting. 
> I think, howewer, that your patch is slightly wrong, so I will post mine 
> anyway. As far as I understand, it is better to do pthread_mutex_unlock and 
> _thread_queue_enc under same _SPINLOCK. (I'm afraid, there is still some 
> races in this code).

I don't think you want to wrap anything other than the condtion
queue and dequeue with the condition spin locks; they should be
used just to protect changing the condition variable.

As long as you enqueue the condition variable before you unlock the
mutex, there should be no race conditions.

Dan Eischen
eischen@vigrid.com

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?199810201545.LAA21709>