cvs commit: src/sys/dev/fdc fdc.c fdcvar.h
John Baldwin
jhb at FreeBSD.org
Thu Sep 23 14:49:54 PDT 2004
On Thursday 23 September 2004 05:12 pm, Joerg Wunsch wrote:
> joerg 2004-09-23 21:12:21 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/dev/fdc fdc.c fdcvar.h
> Log:
> Implement terminating the worker thread when the driver is about to
> be deregistered.
>
> Not yet tested, since by now, GEOM doesn't want us to deregister. PHK
> wants to fix that RSN.
Note that relying on a wakeup from your own code is not safe if you expect fdc
to be a module since you could wakeup the thread doing the kldunload (and
thus detach) and then be interrupted for an interrupt and it could unmap the
memory backing that function before you get a chance to run again resulting
in a panic. There is a special wakeup on the proc pointer in exit1() for
kthreads to handle this case. I should likely move that into kthread_exit()
however (which wouldn't be a functional change as far as you are concerned).
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-all
mailing list