diff options
author | Matthew Macy <[email protected]> | 2020-09-03 20:04:09 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-03 20:04:09 -0700 |
commit | ac6e5fb202a95277cd7886eb7b6acc3ec53d8def (patch) | |
tree | b016a947bae0eee38318eca6c19d619045a7de65 /include/sys | |
parent | f30703f6fc831bdeb5e7a11b5f1c01d6d9cb7799 (diff) |
Replace cv_{timed}wait_sig with cv_{timed}wait_idle where appropriate
There are a number of places where cv_?_sig is used simply for
accounting purposes but the surrounding code has no ability to
cope with actually receiving a signal. On FreeBSD it is possible
to send signals to individual kernel threads so this could
enable undesirable behavior.
This patch adds routines on Linux that will do the same idle
accounting as _sig without making the task interruptible. On
FreeBSD cv_*_idle are all aliases for cv_*
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #10843
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/zfs_context.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 16df302c8..8e16399e8 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -325,11 +325,15 @@ extern void cv_signal(kcondvar_t *cv); extern void cv_broadcast(kcondvar_t *cv); #define cv_timedwait_io(cv, mp, at) cv_timedwait(cv, mp, at) +#define cv_timedwait_idle(cv, mp, at) cv_timedwait(cv, mp, at) #define cv_timedwait_sig(cv, mp, at) cv_timedwait(cv, mp, at) #define cv_wait_io(cv, mp) cv_wait(cv, mp) +#define cv_wait_idle(cv, mp) cv_wait(cv, mp) #define cv_wait_io_sig(cv, mp) cv_wait_sig(cv, mp) #define cv_timedwait_sig_hires(cv, mp, t, r, f) \ cv_timedwait_hires(cv, mp, t, r, f) +#define cv_timedwait_idle_hires(cv, mp, t, r, f) \ + cv_timedwait_hires(cv, mp, t, r, f) /* * Thread-specific data |