summaryrefslogtreecommitdiff
path: root/sys/kern/kern_time.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2014-11-26 14:10:00 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2014-11-26 14:10:00 +0000
commit5c7bebf9610e40f0a216938181d498e76ce77eda (patch)
treea1ba3d51716b09fd5fc82995da8ea68bc729c69f /sys/kern/kern_time.c
parente442f29f085c69b9313697138b172c38b3f38596 (diff)
downloadsrc-test2-5c7bebf9610e40f0a216938181d498e76ce77eda.tar.gz
src-test2-5c7bebf9610e40f0a216938181d498e76ce77eda.zip
Notes
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r--sys/kern/kern_time.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index e8430e4b602d..1ee80f051578 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -276,10 +276,10 @@ get_process_cputime(struct proc *targetp, struct timespec *ats)
uint64_t runtime;
struct rusage ru;
- PROC_SLOCK(targetp);
+ PROC_STATLOCK(targetp);
rufetch(targetp, &ru);
runtime = targetp->p_rux.rux_runtime;
- PROC_SUNLOCK(targetp);
+ PROC_STATUNLOCK(targetp);
cputick2timespec(runtime, ats);
}
@@ -328,17 +328,17 @@ kern_clock_gettime(struct thread *td, clockid_t clock_id, struct timespec *ats)
break;
case CLOCK_VIRTUAL:
PROC_LOCK(p);
- PROC_SLOCK(p);
+ PROC_STATLOCK(p);
calcru(p, &user, &sys);
- PROC_SUNLOCK(p);
+ PROC_STATUNLOCK(p);
PROC_UNLOCK(p);
TIMEVAL_TO_TIMESPEC(&user, ats);
break;
case CLOCK_PROF:
PROC_LOCK(p);
- PROC_SLOCK(p);
+ PROC_STATLOCK(p);
calcru(p, &user, &sys);
- PROC_SUNLOCK(p);
+ PROC_STATUNLOCK(p);
PROC_UNLOCK(p);
timevaladd(&user, &sys);
TIMEVAL_TO_TIMESPEC(&user, ats);
@@ -698,9 +698,9 @@ kern_getitimer(struct thread *td, u_int which, struct itimerval *aitv)
timevalsub(&aitv->it_value, &ctv);
}
} else {
- PROC_SLOCK(p);
+ PROC_ITIMLOCK(p);
*aitv = p->p_stats->p_timer[which];
- PROC_SUNLOCK(p);
+ PROC_ITIMUNLOCK(p);
}
return (0);
}
@@ -782,10 +782,10 @@ kern_setitimer(struct thread *td, u_int which, struct itimerval *aitv,
aitv->it_value.tv_usec != 0 &&
aitv->it_value.tv_usec < tick)
aitv->it_value.tv_usec = tick;
- PROC_SLOCK(p);
+ PROC_ITIMLOCK(p);
*oitv = p->p_stats->p_timer[which];
p->p_stats->p_timer[which] = *aitv;
- PROC_SUNLOCK(p);
+ PROC_ITIMUNLOCK(p);
}
return (0);
}