Module Name:    src
Committed By:   ad
Date:           Sun Oct  8 13:37:26 UTC 2023

Modified Files:
        src/sys/kern: kern_sleepq.c

Log Message:
Oops, fix inverted test.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/kern/kern_sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_sleepq.c
diff -u src/sys/kern/kern_sleepq.c:1.82 src/sys/kern/kern_sleepq.c:1.83
--- src/sys/kern/kern_sleepq.c:1.82	Sun Oct  8 13:23:05 2023
+++ src/sys/kern/kern_sleepq.c	Sun Oct  8 13:37:26 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sleepq.c,v 1.82 2023/10/08 13:23:05 ad Exp $	*/
+/*	$NetBSD: kern_sleepq.c,v 1.83 2023/10/08 13:37:26 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.82 2023/10/08 13:23:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.83 2023/10/08 13:37:26 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -416,7 +416,7 @@ sleepq_block(int timo, bool catch_p, syn
 	 */
 	flag = atomic_load_relaxed(&l->l_flag);
 	if (__predict_false((flag & mask) != 0)) {
-		if ((flag & LW_CATCHINTR) == 0 && error != 0)
+		if ((flag & LW_CATCHINTR) == 0 || error != 0)
 			/* nothing */;
 		else if ((flag & (LW_CANCELLED | LW_WEXIT | LW_WCORE)) != 0)
 			error = EINTR;

Reply via email to