Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Change the kqueue filterops::f_isfd field to filtero...



details:   https://anonhg.NetBSD.org/src/rev/217275172c86
branches:  trunk
changeset: 1023775:217275172c86
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 26 01:16:07 2021 +0000

description:
Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89

diffstat:

 sys/arch/amiga/dev/event.c             |   6 +++---
 sys/arch/arc/dev/opms.c                |   6 +++---
 sys/arch/arm/xscale/pxa2x0_apm.c       |   4 ++--
 sys/arch/atari/dev/event.c             |   6 +++---
 sys/arch/landisk/dev/button.c          |   8 ++++----
 sys/arch/mac68k/dev/aed.c              |   8 ++++----
 sys/arch/macppc/dev/aed.c              |   8 ++++----
 sys/arch/macppc/dev/apm.c              |   6 +++---
 sys/arch/mips/ralink/ralink_gpio.c     |   6 +++---
 sys/arch/sandpoint/sandpoint/satmgr.c  |   4 ++--
 sys/arch/sparc/dev/tctrl.c             |   6 +++---
 sys/arch/x68k/dev/event.c              |   6 +++---
 sys/coda/coda_psdev.c                  |   6 +++---
 sys/dev/apm/apm.c                      |   6 +++---
 sys/dev/audio/audio.c                  |   8 ++++----
 sys/dev/hpc/apm/apmdev.c               |   6 +++---
 sys/dev/ir/irframe_tty.c               |   8 ++++----
 sys/dev/midi.c                         |   8 ++++----
 sys/dev/pci/oboe.c                     |   8 ++++----
 sys/dev/pci/vio9p.c                    |   8 ++++----
 sys/dev/pci/xmm7360.c                  |   6 +++---
 sys/dev/putter/putter.c                |   6 +++---
 sys/dev/qbus/qd.c                      |   8 ++++----
 sys/dev/sbus/bpp.c                     |   8 ++++----
 sys/dev/scsipi/ch.c                    |   8 ++++----
 sys/dev/sequencer.c                    |   8 ++++----
 sys/dev/sun/event.c                    |   6 +++---
 sys/dev/sysmon/sysmon_power.c          |   8 ++++----
 sys/dev/usb/udsir.c                    |   8 ++++----
 sys/dev/usb/ugen.c                     |  12 ++++++------
 sys/dev/usb/uhid.c                     |   8 ++++----
 sys/dev/usb/uirda.c                    |   8 ++++----
 sys/dev/usb/usb.c                      |   6 +++---
 sys/dev/usb/ustir.c                    |   8 ++++----
 sys/dev/wscons/wsevent.c               |   6 +++---
 sys/external/bsd/drm2/drm/drm_cdevsw.c |   6 +++---
 sys/kern/kern_entropy.c                |   6 +++---
 sys/kern/kern_event.c                  |  31 ++++++++++++++++---------------
 sys/kern/kern_sig.c                    |   6 +++---
 sys/kern/subr_log.c                    |   6 +++---
 sys/kern/sys_eventfd.c                 |   8 ++++----
 sys/kern/sys_pipe.c                    |   8 ++++----
 sys/kern/sys_timerfd.c                 |   6 +++---
 sys/kern/tty.c                         |   8 ++++----
 sys/kern/tty_pty.c                     |   8 ++++----
 sys/kern/uipc_socket.c                 |  10 +++++-----
 sys/miscfs/fifofs/fifo_vnops.c         |   8 ++++----
 sys/miscfs/genfs/genfs_vnops.c         |  10 +++++-----
 sys/net/bpf.c                          |   6 +++---
 sys/net/if_tap.c                       |   8 ++++----
 sys/net/if_tun.c                       |   8 ++++----
 sys/nfs/nfs_kq.c                       |   8 ++++----
 sys/sys/event.h                        |   7 +++++--
 sys/sys/param.h                        |   4 ++--
 54 files changed, 206 insertions(+), 202 deletions(-)

diffs (truncated from 1798 to 300 lines):

diff -r 1e43c17dd453 -r 217275172c86 sys/arch/amiga/dev/event.c
--- a/sys/arch/amiga/dev/event.c        Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/amiga/dev/event.c        Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: event.c,v 1.15 2020/12/19 15:12:17 thorpej Exp $ */
+/*     $NetBSD: event.c,v 1.16 2021/09/26 01:16:07 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.15 2020/12/19 15:12:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.16 2021/09/26 01:16:07 thorpej Exp $");
 
 /*
  * Internal `Firm_event' interface for the keyboard and mouse drivers.
@@ -191,7 +191,7 @@
 }
 
 static const struct filterops ev_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_evrdetach,
        .f_event = filt_evread,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/arc/dev/opms.c
--- a/sys/arch/arc/dev/opms.c   Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/arc/dev/opms.c   Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: opms.c,v 1.24 2020/12/19 15:15:04 thorpej Exp $        */
+/*     $NetBSD: opms.c,v 1.25 2021/09/26 01:16:07 thorpej Exp $        */
 /*     $OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $ */
 /*     NetBSD: pms.c,v 1.21 1995/04/18 02:25:18 mycroft Exp    */
 
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: opms.c,v 1.24 2020/12/19 15:15:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: opms.c,v 1.25 2021/09/26 01:16:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -473,7 +473,7 @@
 }
 
 static const struct filterops opmsread_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_opmsrdetach,
        .f_event = filt_opmsread,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/arm/xscale/pxa2x0_apm.c
--- a/sys/arch/arm/xscale/pxa2x0_apm.c  Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_apm.c  Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxa2x0_apm.c,v 1.5 2020/10/30 22:20:38 christos Exp $  */
+/*     $NetBSD: pxa2x0_apm.c,v 1.6 2021/09/26 01:16:07 thorpej Exp $   */
 /*     $OpenBSD: pxa2x0_apm.c,v 1.28 2007/03/29 18:42:38 uwe Exp $     */
 
 /*-
@@ -105,7 +105,7 @@
 int    apmkqfilter(dev_t dev, struct knote *kn);
 
 static const struct filterops apmread_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_apmrdetach,
        .f_event = filt_apmread,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/atari/dev/event.c
--- a/sys/arch/atari/dev/event.c        Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/atari/dev/event.c        Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: event.c,v 1.15 2020/12/19 15:18:04 thorpej Exp $       */
+/*     $NetBSD: event.c,v 1.16 2021/09/26 01:16:07 thorpej Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.15 2020/12/19 15:18:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.16 2021/09/26 01:16:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/fcntl.h>
@@ -191,7 +191,7 @@
 }
 
 static const struct filterops ev_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_evrdetach,
        .f_event = filt_evread,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/landisk/dev/button.c
--- a/sys/arch/landisk/dev/button.c     Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/landisk/dev/button.c     Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: button.c,v 1.11 2021/07/15 05:07:50 rin Exp $  */
+/*     $NetBSD: button.c,v 1.12 2021/09/26 01:16:07 thorpej Exp $      */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: button.c,v 1.11 2021/07/15 05:07:50 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: button.c,v 1.12 2021/09/26 01:16:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -306,14 +306,14 @@
 }
 
 static const struct filterops btn_read_filtops = {
-    .f_isfd = 1,
+    .f_flags = FILTEROP_ISFD,
     .f_attach = NULL,
     .f_detach = filt_btn_rdetach,
     .f_event = filt_btn_read,
 };
 
 static const struct filterops btn_write_filtops = {
-    .f_isfd = 1,
+    .f_flags = FILTEROP_ISFD,
     .f_attach = NULL,
     .f_detach = filt_btn_rdetach,
     .f_event = filt_seltrue,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/mac68k/dev/aed.c
--- a/sys/arch/mac68k/dev/aed.c Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/mac68k/dev/aed.c Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aed.c,v 1.35 2020/12/19 21:46:40 thorpej Exp $ */
+/*     $NetBSD: aed.c,v 1.36 2021/09/26 01:16:07 thorpej Exp $ */
 
 /*
  * Copyright (C) 1994  Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.35 2020/12/19 21:46:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.36 2021/09/26 01:16:07 thorpej Exp $");
 
 #include "opt_adb.h"
 
@@ -598,14 +598,14 @@
 }
 
 static const struct filterops aedread_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_aedrdetach,
        .f_event = filt_aedread,
 };
 
 static const struct filterops aed_seltrue_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_aedrdetach,
        .f_event = filt_seltrue,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/macppc/dev/aed.c
--- a/sys/arch/macppc/dev/aed.c Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/macppc/dev/aed.c Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aed.c,v 1.31 2020/12/19 21:54:42 thorpej Exp $ */
+/*     $NetBSD: aed.c,v 1.32 2021/09/26 01:16:07 thorpej Exp $ */
 
 /*
  * Copyright (C) 1994  Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.31 2020/12/19 21:54:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.32 2021/09/26 01:16:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -603,14 +603,14 @@
 }
 
 static const struct filterops aedread_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_aedrdetach,
        .f_event = filt_aedread
 };
 
 static const struct filterops aed_seltrue_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_aedrdetach,
        .f_event = filt_seltrue
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/macppc/dev/apm.c
--- a/sys/arch/macppc/dev/apm.c Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/macppc/dev/apm.c Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apm.c,v 1.29 2020/12/19 21:54:42 thorpej Exp $ */
+/*     $NetBSD: apm.c,v 1.30 2021/09/26 01:16:07 thorpej Exp $ */
 /*     $OpenBSD: apm.c,v 1.5 2002/06/07 07:13:59 miod Exp $    */
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.29 2020/12/19 21:54:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.30 2021/09/26 01:16:07 thorpej Exp $");
 
 #include "apm.h"
 
@@ -432,7 +432,7 @@
 }
 
 static struct filterops apmread_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_apmrdetach,
        .f_event = filt_apmread,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/mips/ralink/ralink_gpio.c
--- a/sys/arch/mips/ralink/ralink_gpio.c        Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/mips/ralink/ralink_gpio.c        Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ralink_gpio.c,v 1.12 2021/09/03 22:33:17 andvar Exp $  */
+/*     $NetBSD: ralink_gpio.c,v 1.13 2021/09/26 01:16:07 thorpej Exp $ */
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
 /* ra_gpio.c -- Ralink 3052 gpio driver */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.12 2021/09/03 22:33:17 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.13 2021/09/26 01:16:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -495,7 +495,7 @@
 static struct klist knotes;
 static int app_filter_id;
 static struct filterops app_fops = {
-       .f_isfd = 0,
+       .f_flags = 0,
        .f_attach = gpio_event_app_user_attach,
        .f_detach = gpio_event_app_user_detach,
        .f_event = gpio_event_app_user_event,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/sandpoint/sandpoint/satmgr.c
--- a/sys/arch/sandpoint/sandpoint/satmgr.c     Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/sandpoint/sandpoint/satmgr.c     Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.30 2021/03/17 14:50:11 rin Exp $ */
+/* $NetBSD: satmgr.c,v 1.31 2021/09/26 01:16:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -607,7 +607,7 @@
 }
 
 static const struct filterops read_filtops ={
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,
        .f_attach = NULL,
        .f_detach = filt_rdetach,
        .f_event = filt_read,
diff -r 1e43c17dd453 -r 217275172c86 sys/arch/sparc/dev/tctrl.c
--- a/sys/arch/sparc/dev/tctrl.c        Sun Sep 26 00:57:28 2021 +0000
+++ b/sys/arch/sparc/dev/tctrl.c        Sun Sep 26 01:16:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tctrl.c,v 1.63 2021/01/04 15:29:34 thorpej Exp $       */
+/*     $NetBSD: tctrl.c,v 1.64 2021/09/26 01:16:08 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.63 2021/01/04 15:29:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.64 2021/09/26 01:16:08 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1232,7 +1232,7 @@
 }
 
 static const struct filterops tctrlread_filtops = {
-       .f_isfd = 1,
+       .f_flags = FILTEROP_ISFD,



Home | Main Index | Thread Index | Old Index