Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/landisk/dev Use sel{record,remove}_knote().
details: https://anonhg.NetBSD.org/src/rev/287c78f246ee
branches: trunk
changeset: 957986:287c78f246ee
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Dec 19 21:25:03 2020 +0000
description:
Use sel{record,remove}_knote().
diffstat:
sys/arch/landisk/dev/button.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (58 lines):
diff -r bb23b572da26 -r 287c78f246ee sys/arch/landisk/dev/button.c
--- a/sys/arch/landisk/dev/button.c Sat Dec 19 20:47:24 2020 +0000
+++ b/sys/arch/landisk/dev/button.c Sat Dec 19 21:25:03 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: button.c,v 1.9 2017/10/25 08:12:37 maya Exp $ */
+/* $NetBSD: button.c,v 1.10 2020/12/19 21:25:03 thorpej Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: button.c,v 1.9 2017/10/25 08:12:37 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: button.c,v 1.10 2020/12/19 21:25:03 thorpej Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -296,8 +296,7 @@
{
mutex_enter(&btn_event_queue_lock);
- SLIST_REMOVE(&btn_event_queue_selinfo.sel_klist,
- kn, knote, kn_selnext);
+ selremove_knote(&btn_event_queue_selinfo, kn);
mutex_exit(&btn_event_queue_lock);
}
@@ -329,7 +328,6 @@
int
btnkqfilter(dev_t dev, struct knote *kn)
{
- struct klist *klist;
if (minor(dev) != 0) {
return (ENODEV);
@@ -337,12 +335,10 @@
switch (kn->kn_filter) {
case EVFILT_READ:
- klist = &btn_event_queue_selinfo.sel_klist;
kn->kn_fop = &btn_read_filtops;
break;
case EVFILT_WRITE:
- klist = &btn_event_queue_selinfo.sel_klist;
kn->kn_fop = &btn_write_filtops;
break;
@@ -351,7 +347,7 @@
}
mutex_enter(&btn_event_queue_lock);
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+ selrecord_knote(&btn_event_queue_selinfo, kn);
mutex_exit(&btn_event_queue_lock);
return (0);
Home |
Main Index |
Thread Index |
Old Index