Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 2004 15:35:50 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        threads@freebsd.org
Subject:   Re: Proper algorithm for return values from sleep
Message-ID:  <Pine.GSO.4.10.10402271532120.3269-100000@pcnet5.pcnet.com>
In-Reply-To: <200402271455.38197.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 27 Feb 2004, John Baldwin wrote:

> As part of my sleep queue work, I found that msleep() and the cv_wait() 
> functions have differing semantics for return vales.  It appears that at 
> least some of the early changes KSE made to msleep() were ported to cv's but 
> not later cleanups.  Specifically, in msleep(), if we are awakened while 
> checking for signals but we didn't find a signal, we prefer a timeout-related 
> return value over a signal-related value.

It doesn't look like kern_thread.c uses any return values from msleep.
Where else would one look?  I would think that cv's would want to behave
in the same manner.

> Secondly, cv's don't really handle 
> td_intrval very well at all.  It has one hard-coded override for the P_EXIT 
> case but that's it.

I'm not sure about this.  Julian or David would know better.

-- 
Dan Eischen



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