summaryrefslogtreecommitdiff
path: root/sys/arch/loongson/dev/apm.c
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2023-02-10 14:34:18 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2023-02-10 14:34:18 +0000
commit04d3413ff78e66f127de3749e6564ba940ff320e (patch)
tree8d0adc2e66658136bd528d87b27b8bce64fce574 /sys/arch/loongson/dev/apm.c
parent36d295960f2bd4394d4ae7685b11fcb6cdf82d9f (diff)
Adjust knote(9) API
Make knote(9) lock the knote list internally, and add knote_locked(9) for the typical situation where the list is already locked. Remove the KNOTE(9) macro to simplify the API. Manual page OK jmc@ OK mpi@ mvs@
Diffstat (limited to 'sys/arch/loongson/dev/apm.c')
-rw-r--r--sys/arch/loongson/dev/apm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c
index 859c692f2d6..984c2aeb75b 100644
--- a/sys/arch/loongson/dev/apm.c
+++ b/sys/arch/loongson/dev/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.41 2022/11/19 16:23:48 cheloha Exp $ */
+/* $OpenBSD: apm.c,v 1.42 2023/02/10 14:34:16 visa Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -363,7 +363,7 @@ apm_record_event(u_int event, const char *src, const char *msg)
return (1);
apm_evindex++;
- KNOTE(&sc->sc_note, APM_EVENT_COMPOSE(event, apm_evindex));
+ knote_locked(&sc->sc_note, APM_EVENT_COMPOSE(event, apm_evindex));
return (0);
}