summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/trap.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-04-12 23:18:54 +0000
committerjhb <jhb@FreeBSD.org>2005-04-12 23:18:54 +0000
commitf9da7305b5117faca349d5ba989239117812a123 (patch)
treea2ed521163c0f43afce96ee2991e8272378005c3 /sys/powerpc/aim/trap.c
parente62b86cdc54df4ea3928194426ba3744837a7545 (diff)
downloadFreeBSD-src-f9da7305b5117faca349d5ba989239117812a123.zip
FreeBSD-src-f9da7305b5117faca349d5ba989239117812a123.tar.gz
Use PCPU_LAZY_INC() for cnt.v_{intr,trap,syscalls} rather than atomic
operations in some places and simple non-per CPU math in others.
Diffstat (limited to 'sys/powerpc/aim/trap.c')
-rw-r--r--sys/powerpc/aim/trap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index cee51bc..a19cacc 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -147,7 +147,7 @@ trap(struct trapframe *frame)
int sig, type, user;
u_int sticks, ucode;
- atomic_add_int(&cnt.v_trap, 1);
+ PCPU_LAZY_INC(cnt.v_trap);
td = PCPU_GET(curthread);
p = td->td_proc;
@@ -338,7 +338,7 @@ syscall(struct trapframe *frame)
td = PCPU_GET(curthread);
p = td->td_proc;
- atomic_add_int(&cnt.v_syscall, 1);
+ PCPU_LAZY_INC(cnt.v_syscall);
if (p->p_flag & P_SA)
thread_user_enter(td);
OpenPOWER on IntegriCloud