diff options
author | jeff <jeff@FreeBSD.org> | 2007-05-18 07:10:50 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-05-18 07:10:50 +0000 |
commit | e1996cb9609d2e55a26ee78dddbfce4ba4073b53 (patch) | |
tree | c94b660d4b9246fed8cbeadf7851932258d8b72a /sys/kern/subr_trap.c | |
parent | beb495eff1db0646624feb7071ced7f632ff8869 (diff) | |
download | FreeBSD-src-e1996cb9609d2e55a26ee78dddbfce4ba4073b53.zip FreeBSD-src-e1996cb9609d2e55a26ee78dddbfce4ba4073b53.tar.gz |
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts. This can be used to abstract away pcpu details but also changes
to use atomics for all counters now. This means sched lock is no longer
responsible for protecting counts in the switch routines.
Contributed by: Attilio Rao <attilio@FreeBSD.org>
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 15c8fdd..db81011 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -191,8 +191,8 @@ ast(struct trapframe *framep) #endif td->td_flags &= ~(TDF_ASTPENDING | TDF_NEEDSIGCHK | TDF_NEEDRESCHED | TDF_INTERRUPT); - cnt.v_trap++; mtx_unlock_spin(&sched_lock); + VMCNT_ADD(trap, 1); /* * XXXKSE While the fact that we owe a user profiling |