Now that sx(9) locks support an interruptible lock acquire primitive,
properly observe the SB_NOINTR flag in sblock. This restores the required behavior that lock acquisition be interruptible on the socket buffer I/O serialization lock to allow threads waiting for I/O to be signaled even if they aren't the thread currently holding the I/O lock. With this change, the sblock regression test is again passed. Reported by: alfred sx(9) handiwork: attilio
This commit is contained in:
parent
753bcb5c34
commit
049c3b6cdf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170151
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user