From 538638a5b71127ab1f290352c025c7a3601c443d Mon Sep 17 00:00:00 2001 From: visa Date: Mon, 30 May 2022 14:06:16 +0000 Subject: [PATCH] Replace selwakeup() with KNOTE() in pipe event activation. Recommit the reverted change selectively so that only pipes are affected. Leave sockets untouched for now. --- sys/kern/sys_pipe.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index ada1e55c7ef..bd61f838dd3 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.138 2022/05/09 14:49:55 visa Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.139 2022/05/30 14:06:16 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); -- 2.20.1