Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2005 11:46:48 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Colin Percival <cperciva@FreeBSD.org>
Cc:        David Xu <davidxu@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/kern kern_sig.c
Message-ID:  <200503071146.48394.jhb@FreeBSD.org>
In-Reply-To: <42288FA6.7010102@freebsd.org>
References:  <Pine.GSO.4.43.0503031020180.2058-100000@sea.ntplx.net> <20050305032619.K18638@delplex.bde.org> <42288FA6.7010102@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 04 March 2005 11:41 am, Colin Percival wrote:
> Bruce Evans wrote:
> > Sleeping on a stack address is just a bug [...]
>
> I was told that this was the canonical way to say "go to sleep and don't
> wake up until the timo expires" was to tsleep() with ident equal to
> something from the stack.
>
> If this isn't correct, what is the correct way to do this?  I've seen
> some code which does tsleep(NULL, ... ), but I was told that was also
> wrong.

I actually want to make a pause() function for just this purpose that uses 
sleepq_*() with a specific never_wake_me_up wait channel.

-- 
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?200503071146.48394.jhb>