aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mount.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-06-26 20:07:24 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-06-26 20:07:24 +0000
commit3a1e5dd8e63cbee02f14030ae0a1538a0b1907b9 (patch)
treebf68775a98ecb1f2103f9d9861cc640243eb614c /sys/sys/mount.h
parentd929c32b7fa99762b489f8ddb3d404a9dfeaca01 (diff)
downloadsrc-3a1e5dd8e63cbee02f14030ae0a1538a0b1907b9.tar.gz
src-3a1e5dd8e63cbee02f14030ae0a1538a0b1907b9.zip
Rewrite sigdeferstop(9) and sigallowstop(9) into more flexible
framework allowing to set the suspension policy for the dynamic block. Extend the currently possible policies of stopping on interruptible sleeps and ignoring such sleeps by two more: do not suspend at interruptible sleeps, but interrupt them with either EINTR or ERESTART. Reviewed by: jilles Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb)
Notes
Notes: svn path=/head/; revision=302215
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r--sys/sys/mount.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index f11f8f5389f0..5438140dc365 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -653,15 +653,15 @@ vfs_statfs_t __vfs_statfs;
#define VFS_PROLOGUE(MP) do { \
struct mount *mp__; \
- int _enable_stops; \
+ int _prev_stops; \
\
mp__ = (MP); \
- _enable_stops = (mp__ != NULL && \
- (mp__->mnt_vfc->vfc_flags & VFCF_SBDRY) && sigdeferstop())
+ _prev_stops = sigdeferstop((mp__ != NULL && \
+ (mp__->mnt_vfc->vfc_flags & VFCF_SBDRY) != 0) ? \
+ SIGDEFERSTOP_SILENT : SIGDEFERSTOP_NOP);
#define VFS_EPILOGUE(MP) \
- if (_enable_stops) \
- sigallowstop(); \
+ sigallowstop(_prev_stops); \
} while (0)
#define VFS_MOUNT(MP) ({ \