Paul Durrant wrote:
On 28/05/07, Garrett D'Amore <[EMAIL PROTECTED]> wrote:
You should not attempt to acquire a lock which will be held by other
functions calling cv_wait, or its brethren.  (There are ways to do that
safely, but it requires a fair bit of effort to make sure you do it safely.)


I was not aware of this restriction, nor can I find it documented.
This suggests that one cannot call cv_signal() from within an
interrupt handler. Is this true?

No, and I mis-stated the above restriction. The restriction should apply to mutexes held _across_ cv_wait. The mutex passed as an argument to cv_wait is dropped by cv_wait, and not held during the sleep call, so it can be acquired to do cv_signal.


   -- Garrett


_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to