Kernel crash w/o reason

Jan Engelhardt jengelh at linux01.gwdg.de
Fri Dec 24 04:13:37 PST 2004


>> What should I use instead? A semaphore?

>You shouldn't have unrelated kernel threads waiting for a user
>process at all, so this sounds like a design problem, regardless
>of which mutual exclusion primitive you use.  (Bear in mind that I
>haven't actually looked into what you're trying to do.)  In any
>case, you can always use mutexes to implement whatever other
>synchronization mechanism you need.

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.)


More information about the freebsd-hackers mailing list