Date: Thu, 29 Aug 2002 12:19:27 +0200 (CEST) From: Harti Brandt <brandt@fokus.gmd.de> To: hackers@freebsd.org Subject: driver attach/detach functions Message-ID: <20020829121303.F381-100000@beagle.fokus.gmd.de>
next in thread | raw e-mail | index | archive | help
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 brandt@fokus.gmd.de, brandt@fokus.fhg.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020829121303.F381-100000>