freebsd-drivers
[Prev] Thread [Next] | [Prev] Date [Next]
Re: mutex quandry M. Warner Losh Mon Nov 24 13:01:13 2008
In message: <[EMAIL PROTECTED]>
Brad Huntting <[EMAIL PROTECTED]> writes:
: The combination of checking sc_running and incrementing sc_inuse
: needs to be atomic (hence a mutex around them) but at some point
: detach() has to destroy the mutex but my code may still need to use
: it.
Your solution to this is to make sure that never happens. Anything
else is really racy. If you are destroying your mutex and allowing
detach to return, the entire sc is freed, so you're dead from that
anyway...
Warner
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-drivers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
- mutex quandry Brad Huntting
- Re: mutex quandry M. Warner Losh
- Re: mutex quandry Brad Huntting
- Re: mutex quandry M. Warner Losh <=
- Message not available
- Re: mutex quandry M. Warner Losh