freebsd-drivers
[Prev] Thread [Next] | [Prev] Date [Next]
Re: mutex quandry M. Warner Losh Tue Nov 25 10:00:42 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...
:
: Fair enough. I guess I was just too focused on my small part of
: the larger system.
:
: But that brings up another issue. How do my (kernel level) users
: know if my module is loaded or not? I cant find any section 9 docs
: on kernal loadable modules. Am I looking in the wrong place? Or
: do I just need to read the source.
It should be documented in section 9. Use level users can do a
kldstat to find this information. I think kern_kldload will load the
module, but I'm not sure how to get status. I've cc'd drivers@ to see
if someone there knows.
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 <=