In message <[EMAIL PROTECTED]>, Hans Petter Selasky writes:
>Yes, you are right, but the problem is, that for most callback systems in the 
>kernel, there is no mechanism that will pre-lock some custom mutex before 
>calling the callback.
>
>I am not speaking about adding lines to existing code, but to add one extra 
>parameter to the setup functions, where the mutex that should be locked 
>before calling the callback(s) can be specified. If it is NULL, Giant will be 
>used.
>
>The setup functions I have in mind are for example:  "make_dev()", 
>"bus_setup_intr()", "callout_reset()" ... and in general all callback systems 
>that look like these.

Note that FreeBSD's callout subsystem does already have such a
mechanism. Just use callout_init_mtx() and the specified mutex will
be acquired before the callback is invoked. See callout(9) for more
details.

Ian
_______________________________________________
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