Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/sched_4bsd.c
Show First 20 Lines • Show All 1,579 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct td_sched *ts; | struct td_sched *ts; | ||||
THREAD_LOCK_ASSERT(td, MA_OWNED); | THREAD_LOCK_ASSERT(td, MA_OWNED); | ||||
ts = td->td_sched; | ts = td->td_sched; | ||||
return (ts->ts_pctcpu); | return (ts->ts_pctcpu); | ||||
} | } | ||||
#ifdef RACCT | #ifdef RACCT | ||||
/* | /* | ||||
* Calculates the contribution to the thread cpu usage for the latest | * Calculates the contribution to the thread cpu usage for the latest | ||||
* (unfinished) second. | * (unfinished) second. | ||||
*/ | */ | ||||
fixpt_t | fixpt_t | ||||
sched_pctcpu_delta(struct thread *td) | sched_pctcpu_delta(struct thread *td) | ||||
{ | { | ||||
struct td_sched *ts; | struct td_sched *ts; | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |