From 82f77922c94f2a8a45f183d5314b67075786d50e Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 8 Jul 2024 09:15:05 +0000 Subject: [PATCH] Fix comment for exit2() this code is called by sched_idle() not cpu_exit(). The note can be removed but add a comment that since this is called from the idle process exit2() is not allowed to sleep. OK jca@ --- sys/kern/kern_exit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index af34d278d3e..be13ce63593 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.222 2024/06/03 12:48:25 claudio Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.223 2024/07/08 09:15:05 claudio Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -398,12 +398,8 @@ struct mutex deadproc_mutex = struct proclist deadproc = LIST_HEAD_INITIALIZER(deadproc); /* - * We are called from cpu_exit() once it is safe to schedule the - * dead process's resources to be freed. - * - * NOTE: One must be careful with locking in this routine. It's - * called from a critical section in machine-dependent code, so - * we should refrain from changing any interrupt state. + * We are called from sched_idle() once it is safe to schedule the + * dead process's resources to be freed. So this is not allowed to sleep. * * We lock the deadproc list, place the proc on that list (using * the p_hash member), and wake up the reaper. -- 2.20.1