diff options
author | davide <davide@FreeBSD.org> | 2013-08-23 14:12:39 +0000 |
---|---|---|
committer | davide <davide@FreeBSD.org> | 2013-08-23 14:12:39 +0000 |
commit | 7cf3eec1d47287096a555d0fc2d1d8052234abf5 (patch) | |
tree | cf0fd0554d2a91e22e4c56d86234981ed8f3fa10 /sys | |
parent | d2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7 (diff) | |
download | FreeBSD-src-7cf3eec1d47287096a555d0fc2d1d8052234abf5.zip FreeBSD-src-7cf3eec1d47287096a555d0fc2d1d8052234abf5.tar.gz |
Introduce callout_init_rm() so that callouts can be used in conjunction
with rmlocks. This works only with non-sleepable rm because handlers run
in SWI context. While here, document the new KPI in the timeout(9)
manpage.
Requested by: adrian, scottl
Reviewed by: mav, remko(manpage)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/callout.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/callout.h b/sys/sys/callout.h index 9e3eb90..536a0c5 100644 --- a/sys/sys/callout.h +++ b/sys/sys/callout.h @@ -71,6 +71,9 @@ void _callout_init_lock(struct callout *, struct lock_object *, int); #define callout_init_mtx(c, mtx, flags) \ _callout_init_lock((c), ((mtx) != NULL) ? &(mtx)->lock_object : \ NULL, (flags)) +#define callout_init_rm(c, rm, flags) + _callout_init_lock((c), ((rm != NULL) ? &(rm)->lock_object : \ + NULL, (flags)) #define callout_init_rw(c, rw, flags) \ _callout_init_lock((c), ((rw) != NULL) ? &(rw)->lock_object : \ NULL, (flags)) |