Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Oct 2004 18:56:09 +0200
From:      "Damien Bergamini" <damien.bergamini@free.fr>
To:        "Daniel Eischen" <deischen@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: msleep(9) and recursed mutex
Message-ID:  <008401c4afb3$353f8aa0$9e444352@COMETE>
References:  <Pine.GSO.4.43.0410110932350.21570-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for your answer. I'll try your solution with condition variables
and I'll let you know about the results. What I really want to do is
quite simple: avoid wakeup_before_sleep conditions.

--
Damien Bergamini

| Really, you want to be using condition variables.  Use a mutex
| to protect your data and use cv_{timed}wait{_sig}() to sleep.
| When the interrupt occurs, you use cv_signal() or cv_broadcast()
| to wake up any waiters.
| 
| -- 
| DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008401c4afb3$353f8aa0$9e444352>