diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2022-05-06 13:09:42 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2022-05-06 13:09:42 +0000 |
commit | 38c4e419b9c2dda1ac3146f6e30a73a585cef34a (patch) | |
tree | 78f30fe87ee98f596bd8e29736e34ec87a7edbf6 /sys | |
parent | 9c184e70ddc17bb27a46362d22f628dbafd9166e (diff) |
Replace selwakeup() with KNOTE() in pipe and socket event activation.
OK mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sys_pipe.c | 9 | ||||
-rw-r--r-- | sys/kern/uipc_socket.c | 4 | ||||
-rw-r--r-- | sys/kern/uipc_socket2.c | 4 |
3 files changed, 6 insertions, 11 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 5168916e405..daa6b2ad1c4 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.136 2022/02/13 13:05:51 visa Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.137 2022/05/06 13:09:41 visa Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -374,12 +374,7 @@ pipeselwakeup(struct pipe *cpipe) { rw_assert_wrlock(cpipe->pipe_lock); - if (cpipe->pipe_state & PIPE_SEL) { - cpipe->pipe_state &= ~PIPE_SEL; - selwakeup(&cpipe->pipe_sel); - } else { - KNOTE(&cpipe->pipe_sel.si_note, 0); - } + KNOTE(&cpipe->pipe_sel.si_note, 0); if (cpipe->pipe_state & PIPE_ASYNC) pgsigio(&cpipe->pipe_sigio, SIGIO, 0); diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 0d721fbed00..fc485fdad54 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.275 2022/02/25 23:51:03 guenther Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.276 2022/05/06 13:09:41 visa Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -2039,7 +2039,7 @@ void sohasoutofband(struct socket *so) { pgsigio(&so->so_sigio, SIGURG, 0); - selwakeup(&so->so_rcv.sb_sel); + KNOTE(&so->so_rcv.sb_sel.si_note, 0); } int diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index befc826548d..550779809b0 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.120 2022/02/25 23:51:03 guenther Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.121 2022/05/06 13:09:41 visa Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -423,7 +423,7 @@ sowakeup(struct socket *so, struct sockbuf *sb) } if (sb->sb_flags & SB_ASYNC) pgsigio(&so->so_sigio, SIGIO, 0); - selwakeup(&sb->sb_sel); + KNOTE(&sb->sb_sel.si_note, 0); } /* |