-/* $OpenBSD: kern_exit.c,v 1.227 2024/07/24 15:30:17 claudio Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.228 2024/07/29 09:49:49 claudio Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
memset(rusage, 0, sizeof(*rusage));
return (0);
}
- if ((options & WCONTINUED) && (p->p_flag & P_CONTINUED)) {
+ if ((options & WCONTINUED) && (pr->ps_flags & PS_CONTINUED)) {
if ((options & WNOWAIT) == 0)
- atomic_clearbits_int(&p->p_flag, P_CONTINUED);
+ atomic_clearbits_int(&pr->ps_flags,
+ PS_CONTINUED);
*retval = pr->ps_pid;
if (info != NULL) {
-/* $OpenBSD: kern_sig.c,v 1.334 2024/07/24 15:31:08 claudio Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.335 2024/07/29 09:49:49 claudio Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
* an event, then it goes back to run state.
* Otherwise, process goes back to sleep state.
*/
- atomic_setbits_int(&p->p_flag, P_CONTINUED);
+ atomic_setbits_int(&pr->ps_flags, PS_CONTINUED);
atomic_clearbits_int(&p->p_flag, P_SUSPSIG);
wakeparent = 1;
if (action == SIG_DFL)
}
if (prop & SA_STOP) {
atomic_clearbits_int(siglist, CONTSIGMASK);
- atomic_clearbits_int(&p->p_flag, P_CONTINUED);
+ atomic_clearbits_int(&pr->ps_flags, PS_CONTINUED);
}
SCHED_UNLOCK();
-/* $OpenBSD: proc.h,v 1.365 2024/07/22 09:43:47 claudio Exp $ */
+/* $OpenBSD: proc.h,v 1.366 2024/07/29 09:49:49 claudio Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
#define PS_ITIMER 0x04000000 /* Virtual interval timers running */
#define PS_PIN 0x08000000 /* ld.so or static syscall pin */
#define PS_LIBCPIN 0x10000000 /* libc.so syscall pin */
+#define PS_CONTINUED 0x20000000 /* Continued proc not yet waited for */
#define PS_BITS \
("\20" "\01CONTROLT" "\02EXEC" "\03INEXEC" "\04EXITING" "\05SUGID" \
"\017NOZOMBIE" "\020STOPPED" "\021SYSTEM" "\022EMBRYO" "\023ZOMBIE" \
"\024NOBROADCASTKILL" "\025PLEDGE" "\026WXNEEDED" "\027EXECPLEDGE" \
"\030ORPHAN" "\031CHROOT" "\032NOBTCFI" "\033ITIMER" "\034PIN" \
- "\035LIBCPIN")
+ "\035LIBCPIN" "\036CONTINUED")
struct kcov_dev;
struct lock_list_entry;
#define P_WEXIT 0x00002000 /* Working on exiting. */
#define P_OWEUPC 0x00008000 /* Owe proc an addupc() at next ast. */
#define P_SUSPSINGLE 0x00080000 /* Need to stop for single threading. */
-#define P_CONTINUED 0x00800000 /* Proc has continued from a stopped state. */
#define P_THREAD 0x04000000 /* Only a thread, not a real process */
#define P_SUSPSIG 0x08000000 /* Stopped from signal. */
#define P_CPUPEG 0x40000000 /* Do not move to another cpu. */
#define P_BITS \
("\20" "\01INKTR" "\02PROFPEND" "\03ALRMPEND" "\04SIGSUSPEND" \
"\05CANTSLEEP" "\06WSLEEP" "\010SINTR" "\012SYSTEM" "\013TIMEOUT" \
- "\016WEXIT" "\020OWEUPC" "\024SUSPSINGLE" "\030CONTINUED" "\033THREAD" \
+ "\016WEXIT" "\020OWEUPC" "\024SUSPSINGLE" "\033THREAD" \
"\034SUSPSIG" "\037CPUPEG")
#define THREAD_PID_OFFSET 100000