summaryrefslogtreecommitdiffstats
path: root/sys/sys/resourcevar.h
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-06-09 21:48:44 +0000
committerattilio <attilio@FreeBSD.org>2007-06-09 21:48:44 +0000
commit12d804e413f2c44d9e10f25ee1b546f2b48c598b (patch)
tree7fca182049d1ed6ecc1c3b117e1d77c681c922c3 /sys/sys/resourcevar.h
parent82a09af23776643f85a5e710a09bef3be83823d9 (diff)
downloadFreeBSD-src-12d804e413f2c44d9e10f25ee1b546f2b48c598b.zip
FreeBSD-src-12d804e413f2c44d9e10f25ee1b546f2b48c598b.tar.gz
rufetch and calcru sometimes should be called atomically together.
This patch fixes places where they should be called atomically changing their locking requirements (both assume per-proc spinlock held) and introducing rufetchcalc which wrappers both calls to be performed in atomic way. Reviewed by: jeff Approved by: jeff (mentor)
Diffstat (limited to 'sys/sys/resourcevar.h')
-rw-r--r--sys/sys/resourcevar.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index a94ba94..ea8bbdb 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -123,8 +123,10 @@ rlim_t lim_max(struct proc *p, int which);
void lim_rlimit(struct proc *p, int which, struct rlimit *rlp);
void ruadd(struct rusage *ru, struct rusage_ext *rux, struct rusage *ru2,
struct rusage_ext *rux2);
-void rufetch(struct proc *p, struct rusage *ru);
void rucollect(struct rusage *ru, struct rusage *ru2);
+void rufetch(struct proc *p, struct rusage *ru);
+void rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up,
+ struct timeval *sp);
void ruxagg(struct rusage_ext *rux, struct thread *td);
int suswintr(void *base, int word);
struct uidinfo
OpenPOWER on IntegriCloud