>> I wanted that the device can only be opened once,
>> and holding a mutex while it
>> is open seemed like a simple idea. (Since
>> mtx_trylock() will then fail -- easy
>> to implement.)
>
>An even more simpler idea would be to set a flag in
>the softc data structure on initialization, so as to
>avoid initializing again.

And where do I do that? Do you mean in the struct cdevsw?



Jan Engelhardt
-- 
ENOSPC
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to