sync with OpenBSD -current

This commit is contained in:
purplerain 2024-01-16 01:36:31 +00:00
parent 25aa71bc5f
commit 34a3d7e18a
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
32 changed files with 640 additions and 460 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_exit.c,v 1.217 2023/09/29 12:47:34 claudio Exp $ */
/* $OpenBSD: kern_exit.c,v 1.218 2024/01/15 15:47:37 mvs Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@ -165,6 +165,8 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
/* main thread gotta wait because it has the pid, et al */
while (pr->ps_threadcnt > 1)
tsleep_nsec(&pr->ps_threads, PWAIT, "thrdeath", INFSLP);
LIST_REMOVE(pr, ps_list);
refcnt_finalize(&pr->ps_refcnt, "psdtor");
}
rup = pr->ps_ru;
@ -252,7 +254,6 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
if ((p->p_flag & P_THREAD) == 0) {
LIST_REMOVE(pr, ps_hash);
LIST_REMOVE(pr, ps_list);
if ((pr->ps_flags & PS_NOZOMBIE) == 0)
LIST_INSERT_HEAD(&zombprocess, pr, ps_list);