diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-10-08 11:58:00 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-10-08 11:58:00 +0000 |
commit | 95fc67dc16e9e434bea9ac58b6b562fc8b9b637a (patch) | |
tree | 619c68f2018795db69c9b241055d183915154521 /sys/kern/kern_sched.c | |
parent | df9a8a5213ad399740dde4efc6709e35bee18ae3 (diff) |
Move common code to update the proc runtime into tuagg_add_runtime().
OK mpi@ kn@
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r-- | sys/kern/kern_sched.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index 9aca302233b..27784d35baf 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.101 2024/10/06 01:50:56 jsg Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.102 2024/10/08 11:57:59 claudio Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org> * @@ -213,21 +213,10 @@ void sched_exit(struct proc *p) { struct schedstate_percpu *spc = &curcpu()->ci_schedstate; - struct timespec ts; LIST_INSERT_HEAD(&spc->spc_deadproc, p, p_hash); - /* update the tu_runtime one last time */ - nanouptime(&ts); - if (timespeccmp(&ts, &spc->spc_runtime, <)) - timespecclear(&ts); - else - timespecsub(&ts, &spc->spc_runtime, &ts); - - /* add the time counts for this thread */ - tu_enter(&p->p_tu); - timespecadd(&p->p_tu.tu_runtime, &ts, &p->p_tu.tu_runtime); - tu_leave(&p->p_tu); + tuagg_add_runtime(); KERNEL_ASSERT_LOCKED(); sched_toidle(); |