summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2004-02-27 21:15:46 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2004-02-27 21:15:46 +0000
commitff57b30819373fd7e2135484db1c3b0cd874fcd3 (patch)
tree8a7894b15573209222d27febbcf31bb6af2a8626 /sys/kern/kern_sysctl.c
parent7e8c2ed9cc5ceb5d64086482a297efa79f805523 (diff)
Introduce simple priorities mechanism so that concurrent
hw.setperf handlers don't override each other. Problem reported and tested by danh@. ok tedu@ deraadt@
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 472d9f645b9..b1521a30465 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.101 2004/02/15 11:14:45 markus Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.102 2004/02/27 21:15:45 grange Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -98,6 +98,7 @@ int sysctl_emul(int *, u_int, void *, size_t *, void *, size_t);
int (*cpu_cpuspeed)(int *);
int (*cpu_setperf)(int);
+int setperf_prio = 0; /* for concurrent handlers */
/*
* Lock to avoid too many processes vslocking a large amount of memory