Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 2004 14:55:38 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        threads@FreeBSD.org
Subject:   Proper algorithm for return values from sleep
Message-ID:  <200402271455.38197.jhb@FreeBSD.org>

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

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402271455.38197.jhb>