Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2001 09:26:48 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Alfred Perlstein <bright@mu.org>
Cc:        arch@freebsd.org
Subject:   Re: the condvar stuff.
Message-ID:  <Pine.BSF.4.21.0112270924250.88161-100000@InterJet.elischer.org>
In-Reply-To: <20011227040146.A55891@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 27 Dec 2001, Alfred Perlstein wrote:

> * Julian Elischer <julian@elischer.org> [011227 03:20] wrote:
> > need to be able to cancel any cv or msleep in a threads world... Well I
> > don't NEED to but if I can't cancel a thread waiting on a cv then exit()
> > can take arbitrarily long as the exiting thread has to wait for all the
> > other threads to finish waiting on the CV.
> 
> This is too much work.  What you want to do is post signals to
> each "thread", this will make all interruptable (PCATCH/cv_sig)
> threads return up the syscall path.  You may have to wait for
> non PCATCH/cv_sig threads because you have no choice.  Most of
> those uninterruptable sleeps are there because it would be really
> difficult to handle an abort at that stage or becuase you've loaned
> out a resource that you must reclaim in order to "set right".
> 
> For now you should just consider using the existing mechanisms,
> something like a posted signal and not worry about the uninterruptable
> sleeps.

That's what I'm doing....

> 
> > Basically one of the changes I'll be doing in the KSE tree
> > as that all  msleeps and cv waits and sx waits and mutx waits have 
> > to either be identifiable as uninterruptable, or ba capable of
> > being interrupted (so at least the next layer can catch it and back out).
> 
> Yes, this is what PCATCH is for.

I know, I'm just dissapointed at the ease that I have in finding cases
where all I can do is wait...
:-/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0112270924250.88161-100000>