summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index b8b8fee..3a5d575 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -631,11 +631,11 @@ lim_cb(void *arg)
*/
if (p->p_cpulimit == RLIM_INFINITY)
return;
- PROC_SLOCK(p);
+ PROC_STATLOCK(p);
FOREACH_THREAD_IN_PROC(p, td) {
ruxagg(p, td);
}
- PROC_SUNLOCK(p);
+ PROC_STATUNLOCK(p);
if (p->p_rux.rux_runtime > p->p_cpulimit * cpu_tickrate()) {
lim_rlimit(p, RLIMIT_CPU, &rlim);
if (p->p_rux.rux_runtime >= rlim.rlim_max * cpu_tickrate()) {
@@ -847,7 +847,7 @@ calcru(struct proc *p, struct timeval *up, struct timeval *sp)
uint64_t runtime, u;
PROC_LOCK_ASSERT(p, MA_OWNED);
- PROC_SLOCK_ASSERT(p, MA_OWNED);
+ PROC_STATLOCK_ASSERT(p, MA_OWNED);
/*
* If we are getting stats for the current process, then add in the
* stats that this thread has accumulated in its current time slice.
@@ -879,7 +879,7 @@ rufetchtd(struct thread *td, struct rusage *ru)
uint64_t runtime, u;
p = td->td_proc;
- PROC_SLOCK_ASSERT(p, MA_OWNED);
+ PROC_STATLOCK_ASSERT(p, MA_OWNED);
THREAD_LOCK_ASSERT(td, MA_OWNED);
/*
* If we are getting stats for the current thread, then add in the
@@ -1015,11 +1015,11 @@ kern_getrusage(struct thread *td, int who, struct rusage *rup)
break;
case RUSAGE_THREAD:
- PROC_SLOCK(p);
+ PROC_STATLOCK(p);
thread_lock(td);
rufetchtd(td, rup);
thread_unlock(td);
- PROC_SUNLOCK(p);
+ PROC_STATUNLOCK(p);
break;
default:
@@ -1066,7 +1066,7 @@ ruxagg_locked(struct rusage_ext *rux, struct thread *td)
{
THREAD_LOCK_ASSERT(td, MA_OWNED);
- PROC_SLOCK_ASSERT(td->td_proc, MA_OWNED);
+ PROC_STATLOCK_ASSERT(td->td_proc, MA_OWNED);
rux->rux_runtime += td->td_incruntime;
rux->rux_uticks += td->td_uticks;
rux->rux_sticks += td->td_sticks;
@@ -1096,7 +1096,7 @@ rufetch(struct proc *p, struct rusage *ru)
{
struct thread *td;
- PROC_SLOCK_ASSERT(p, MA_OWNED);
+ PROC_STATLOCK_ASSERT(p, MA_OWNED);
*ru = p->p_ru;
if (p->p_numthreads > 0) {
@@ -1117,10 +1117,10 @@ rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up,
struct timeval *sp)
{
- PROC_SLOCK(p);
+ PROC_STATLOCK(p);
rufetch(p, ru);
calcru(p, up, sp);
- PROC_SUNLOCK(p);
+ PROC_STATUNLOCK(p);
}
/*
OpenPOWER on IntegriCloud