From ba2390ce0b6513ce67284aca99e6c3ee386c1d35 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 22 Jul 2024 09:43:47 +0000 Subject: [PATCH] Rename PS_STOPPED to PS_STOPPING. I want to use PS_STOPPED to indicate that a process has been stopped so make room for that. OK kettenis@ --- sys/kern/kern_sig.c | 8 ++++---- sys/sys/proc.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d4a5bd8b022..51879e9b973 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.332 2024/07/10 12:28:46 claudio Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.333 2024/07/22 09:43:47 claudio Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -1482,7 +1482,7 @@ proc_stop(struct proc *p, int sw) p->p_stat = SSTOP; atomic_clearbits_int(&pr->ps_flags, PS_WAITED); - atomic_setbits_int(&pr->ps_flags, PS_STOPPED); + atomic_setbits_int(&pr->ps_flags, PS_STOPPING); atomic_setbits_int(&p->p_flag, P_SUSPSIG); /* * We need this soft interrupt to be handled fast. @@ -1505,9 +1505,9 @@ proc_stop_sweep(void *v) struct process *pr; LIST_FOREACH(pr, &allprocess, ps_list) { - if ((pr->ps_flags & PS_STOPPED) == 0) + if ((pr->ps_flags & PS_STOPPING) == 0) continue; - atomic_clearbits_int(&pr->ps_flags, PS_STOPPED); + atomic_clearbits_int(&pr->ps_flags, PS_STOPPING); if ((pr->ps_pptr->ps_sigacts->ps_sigflags & SAS_NOCLDSTOP) == 0) prsignal(pr->ps_pptr, SIGCHLD); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 2014e75a41a..5e2960f8df7 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.364 2024/07/17 09:54:14 claudio Exp $ */ +/* $OpenBSD: proc.h,v 1.365 2024/07/22 09:43:47 claudio Exp $ */ /* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */ /*- @@ -287,7 +287,7 @@ struct process { #define PS_SINGLEEXIT 0x00001000 /* Other threads must die. */ #define PS_SINGLEUNWIND 0x00002000 /* Other threads must unwind. */ #define PS_NOZOMBIE 0x00004000 /* No signal or zombie at exit. */ -#define PS_STOPPED 0x00008000 /* Just stopped, need sig to parent. */ +#define PS_STOPPING 0x00008000 /* Just stopped, need sig to parent. */ #define PS_SYSTEM 0x00010000 /* No sigs, stats or swapping. */ #define PS_EMBRYO 0x00020000 /* New process, not yet fledged */ #define PS_ZOMBIE 0x00040000 /* Dead and ready to be waited for */ -- 2.20.1