summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_evcount.c43
-rw-r--r--sys/sys/evcount.h5
2 files changed, 2 insertions, 46 deletions
diff --git a/sys/kern/subr_evcount.c b/sys/kern/subr_evcount.c
index 0a91c20ac3b..3b0ca7223b3 100644
--- a/sys/kern/subr_evcount.c
+++ b/sys/kern/subr_evcount.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_evcount.c,v 1.3 2004/09/23 21:08:54 deraadt Exp $ */
+/* $OpenBSD: subr_evcount.c,v 1.4 2004/09/29 07:37:04 miod Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
* Copyright (c) 2004 Aaron Campbell <aaron@openbsd.org>
@@ -44,17 +44,10 @@ struct evcount evcount_intr;
void evcount_timeout(void *);
void evcount_init(void);
-void evcount_sync(struct evcount *);
void
evcount_init(void)
{
-#ifndef __LP64__
- static struct timeout ec_to;
-
- timeout_set(&ec_to, evcount_timeout, &ec_to);
- timeout_add(&ec_to, hz);
-#endif
TAILQ_INIT(&evcount_list);
evcount_attach(&evcount_intr, "intr", NULL, NULL);
@@ -157,38 +150,4 @@ evcount_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
return (error);
}
-#ifndef __LP64__
-/*
- * This timeout has to run once in a while for every event counter to
- * sync the real 64 bit counter with the 32 bit temporary counter, because
- * we cannot atomically increment the 64 bit counter on 32 bit systems.
- */
-void
-evcount_timeout(void *v)
-{
- struct timeout *to = v;
- int s;
-
- s = splhigh();
- if (evcount_next_sync == NULL)
- evcount_next_sync = TAILQ_FIRST(&evcount_list);
-
- evcount_sync(evcount_next_sync);
- evcount_next_sync = TAILQ_NEXT(evcount_next_sync, next);
- splx(s);
-
- timeout_add(to, hz);
-}
-#endif
-
-void
-evcount_sync(struct evcount *ec)
-{
-#ifndef __LP64__
- /* XXX race */
- ec->ec_count += ec->ec_count32;
- ec->ec_count32 = 0;
-#endif
-}
-
#endif /* __HAVE_EVCOUNT */
diff --git a/sys/sys/evcount.h b/sys/sys/evcount.h
index 98529e15f54..6808bd78e94 100644
--- a/sys/sys/evcount.h
+++ b/sys/sys/evcount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: evcount.h,v 1.1 2004/06/28 01:34:46 aaron Exp $ */
+/* $OpenBSD: evcount.h,v 1.2 2004/09/29 07:37:07 miod Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
* Copyright (c) 2004 Aaron Campbell <aaron@openbsd.org>
@@ -34,9 +34,6 @@
struct evcount {
u_int64_t ec_count; /* main counter */
-#ifndef __LP64__
- u_int32_t ec_count32; /* temporary 32-bit counter */
-#endif
int ec_id; /* counter ID */
const char *ec_name; /* counter name */
struct evcount *ec_parent; /* parent */