sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-29 22:23:51 +00:00
parent 18b0c95b14
commit 708141b7a2
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
21 changed files with 232 additions and 72 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sched_bsd.c,v 1.83 2023/08/19 11:14:11 claudio Exp $ */
/* $OpenBSD: sched_bsd.c,v 1.84 2023/08/29 16:19:34 claudio Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@ -385,13 +385,13 @@ mi_switch(void)
(long long)spc->spc_runtime.tv_sec,
spc->spc_runtime.tv_nsec);
#endif
timespecclear(&ts);
} else {
timespecsub(&ts, &spc->spc_runtime, &ts);
timespecadd(&p->p_rtime, &ts, &p->p_rtime);
}
/* add the time counts for this thread to the process's total */
tuagg_unlocked(pr, p);
tuagg_locked(pr, p, &ts);
/* Stop any optional clock interrupts. */
if (ISSET(spc->spc_schedflags, SPCF_ITIMER)) {