[EMAIL PROTECTED] wrote:
As my understand, cv_wait and its brethren could be called from a
interrupt context, including a soft interrupt context.
For this reason, when people read the timeout(9F), he will think since
timeout handler's context is considered as a soft interrupt context, it
will be safe if we called it in the timeout handler.
But I did encounter the situation that the timeout handler attempts to
acquire a lock which held by other functions calling cv_timedwait, and
that caused the system hang.
I don't think that you can sleep in anyway in a soft interrupt handler
either except when acquiring an appropriate interrupt mutex.
Yes, you are right. Thanks for your clarification.
In condvar(9F) CONTEXT section, we can read the detail info about using
the cv_wait in a interrupt context.
If people who is familiar with the constrict of the interrupt context,
should know how to handle the case in timeout(9F).
Consider my previous example, cv_wait was not direct called by timeout
handler.., Maybe we can add some tips in timeout(9F)'s CONTEXT section.
--
Cheers,
----------------------------------------------------------------------
Oliver Yang | [EMAIL PROTECTED] | x82229 | Work from office
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code