summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sockbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r--sys/kern/uipc_sockbuf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 25d9200..1b1e271 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -138,8 +138,11 @@ sblock(struct sockbuf *sb, int flags)
{
if (flags == M_WAITOK) {
- sx_xlock(&sb->sb_sx);
- return (0);
+ if (sb->sb_flags & SB_NOINTR) {
+ sx_xlock(&sb->sb_sx);
+ return (0);
+ }
+ return (sx_xlock_sig(&sb->sb_sx));
} else {
if (sx_try_xlock(&sb->sb_sx) == 0)
return (EWOULDBLOCK);
OpenPOWER on IntegriCloud