Hi,

while trying to get rid of 'could sleep with mutex' messages a question
occured to me: is there any global mechanism that ensures that no two
threads enter the interface attach/detach functions at the same time?
If there is, there should be a hint in driver(9) probably. If there isn't
what is the canonical way to implement an MP-safe attach function? Some
drivers use

foo_attach(...)
{
        mtx_init(&sc->mtx, ...
        mtx_lock(&sc->mtx);
...

but this really doesn't help.

Regards,
harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              [EMAIL PROTECTED], [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to