summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-07-07 15:37:23 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-07-07 15:37:23 +0000
commitb4a8c27d2ffa9781b822e5a61064a26360097ed7 (patch)
treee0be19c20ff0bf316b94104c846b954854735cbe /sys/arch
parentd25110465042d9a01fa055882840352812600666 (diff)
Use atomic operations to increment clock interrupt counter.
ok art@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/clock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c
index 8dc5674c559..a7bac04c4d2 100644
--- a/sys/arch/sparc64/sparc64/clock.c
+++ b/sys/arch/sparc64/sparc64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.47 2008/08/10 14:13:05 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.48 2010/07/07 15:37:22 kettenis Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
@@ -777,7 +777,7 @@ tickintr(cap)
while (ci->ci_tick < tick()) {
ci->ci_tick += tick_increment;
hardclock((struct clockframe *)cap);
- level0.ih_count.ec_count++;
+ atomic_add_ulong((unsigned long *)&level0.ih_count.ec_count, 1);
}
/* Reset the interrupt. */
@@ -801,7 +801,7 @@ sys_tickintr(cap)
while (ci->ci_tick < sys_tick()) {
ci->ci_tick += tick_increment;
hardclock((struct clockframe *)cap);
- level0.ih_count.ec_count++;
+ atomic_add_ulong((unsigned long *)&level0.ih_count.ec_count, 1);
}
/* Reset the interrupt. */
@@ -825,7 +825,7 @@ stickintr(cap)
while (ci->ci_tick < stick()) {
ci->ci_tick += tick_increment;
hardclock((struct clockframe *)cap);
- level0.ih_count.ec_count++;
+ atomic_add_ulong((unsigned long *)&level0.ih_count.ec_count, 1);
}
/* Reset the interrupt. */