diff options
author | attilio <attilio@FreeBSD.org> | 2007-11-20 00:37:45 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-11-20 00:37:45 +0000 |
commit | 6c4cd05be50053faf8e34d54658f463bbb1f9779 (patch) | |
tree | 3ece3b77fdcda6430089e6c864821e50d11b6cea /bin/ed/README | |
parent | 0e8f2ba6baa43a0010f7d36e884aa4a40923558f (diff) | |
download | FreeBSD-src-6c4cd05be50053faf8e34d54658f463bbb1f9779.zip FreeBSD-src-6c4cd05be50053faf8e34d54658f463bbb1f9779.tar.gz |
Add the function callout_init_rw() to callout facility in order to use
rwlocks in conjuction with callouts. The function does basically what
callout_init_mtx() alredy does with the difference of using a rwlock
as extra argument.
CALLOUT_SHAREDLOCK flag can be used, now, in order to acquire the lock only
in read mode when running the callout handler. It has no effects when used
in conjuction with mtx.
In order to implement this, underlying callout functions have been made
completely lock type-unaware, so accordingly with this, sysctl
debug.to_avg_mtxcalls is now changed in the generic
debug.to_avg_lockcalls.
Note: currently the allowed lock classes are mutexes and rwlocks because
callout handlers run in softclock swi, so they cannot sleep and they
cannot acquire sleepable locks like sx or lockmgr.
Requested by: kmacy, pjd, rwatson
Reviewed by: jhb
Diffstat (limited to 'bin/ed/README')
0 files changed, 0 insertions, 0 deletions