freebsd-dev/share
Ian Dowse 98c926b20f Add a mechanism for associating a mutex with a callout when the
callout is first initialised, using a new function callout_init_mtx().
The callout system will acquire this mutex before calling the callout
function and release it on return.

In addition, the callout system uses the mutex to avoid most of the
complications and race conditions inherent in asynchronous timer
facilities, so mutex-protected callouts have much simpler semantics.
As long as the mutex is held when invoking callout_stop() or
callout_reset(), then these functions will guarantee that the callout
will be stopped, even if softclock() had already begun to process
the callout.

Existing Giant-locked callouts will automatically pick up the new
race-free semantics. This should close a number of race conditions
in the USB code and probably other areas of the kernel too.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques mentioned in timeout(9) to avoid
race conditions.
2005-02-07 02:47:33 +00:00
..
colldef Utilize FILES and SYMLINKS, other simplifications. 2004-10-16 19:51:34 +00:00
dict Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
doc Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
examples Document NO_GPIB 2005-02-06 16:46:49 +00:00
info Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
isdn
man Add a mechanism for associating a mutex with a callout when the 2005-02-07 02:47:33 +00:00
me
misc Add FreeBSD 4.11. 2005-01-25 19:16:09 +00:00
mk Linkage with -lobjc requires -lpthread nowadays. 2005-01-26 00:17:03 +00:00
mklocale Utilize FILES and SYMLINKS. 2004-10-17 09:48:23 +00:00
monetdef - Utilize standard means for installing files and symlinks. 2004-10-13 15:47:02 +00:00
msgdef Utilize FILES and SYMLINKS. 2004-10-17 10:49:30 +00:00
numericdef Use comma instead of a single quote as the decimal point separator for 2004-11-16 14:58:20 +00:00
security Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
sendmail Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
skel Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
snmp Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
syscons Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
tabset
termcap Mechanically kill hard sentence breaks and double whitespaces. 2004-07-03 18:29:24 +00:00
timedef Install files with mode 444, as God intended. 2004-10-16 20:52:32 +00:00
zoneinfo Latest IERS Bulletin C (#29): no leap second on 2005-06-30. 2005-01-15 21:53:24 +00:00
Makefile Add a FreeBSD MIB with a few branches we can hang things from. 2004-04-24 19:54:55 +00:00
Makefile.inc