Source-Changes-HG archive

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

[src/trunk]: src A couple of <sys/select.h>-related changes:



details:   https://anonhg.NetBSD.org/src/rev/ffd1fc280d48
branches:  trunk
changeset: 579560:ffd1fc280d48
user:      kleink <kleink%NetBSD.org@localhost>
date:      Thu Mar 17 20:39:17 2005 +0000

description:
A couple of <sys/select.h>-related changes:
* Factor out struct selinfo and its header dependencies into its own header,
  <sys/selinfo.h>, to avoid namespace pollution.
* Include <sys/selinfo.h> in user-visible headers where necessary.

diffstat:

 distrib/sets/lists/comp/mi    |   3 +-
 sys/arch/pmax/include/fbvar.h |   3 +-
 sys/net/bpfdesc.h             |   4 +-
 sys/sys/Makefile              |   4 +-
 sys/sys/pipe.h                |   4 +-
 sys/sys/select.h              |  17 +------------
 sys/sys/selinfo.h             |  50 +++++++++++++++++++++++++++++++++++++++++++
 sys/sys/socketvar.h           |   5 ++-
 sys/sys/tty.h                 |   5 ++-
 9 files changed, 68 insertions(+), 27 deletions(-)

diffs (212 lines):

diff -r d9022d134b2c -r ffd1fc280d48 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Thu Mar 17 18:44:09 2005 +0000
+++ b/distrib/sets/lists/comp/mi        Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.770 2005/03/13 15:20:09 perry Exp $
+#      $NetBSD: mi,v 1.771 2005/03/17 20:39:17 kleink Exp $
 ./etc/mtree/set.comp                           comp-sys-root
 ./usr/bin/addr2line                            comp-debug-bin          bfd
 ./usr/bin/ar                                   comp-util-bin           bfd
@@ -1383,6 +1383,7 @@
 ./usr/include/sys/sched.h                      comp-c-include
 ./usr/include/sys/scsiio.h                     comp-c-include
 ./usr/include/sys/select.h                     comp-c-include
+./usr/include/sys/selinfo.h                    comp-c-include
 ./usr/include/sys/sem.h                                comp-c-include
 ./usr/include/sys/sha1.h                       comp-c-include
 ./usr/include/sys/shm.h                                comp-c-include
diff -r d9022d134b2c -r ffd1fc280d48 sys/arch/pmax/include/fbvar.h
--- a/sys/arch/pmax/include/fbvar.h     Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/arch/pmax/include/fbvar.h     Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fbvar.h,v 1.12 2003/08/07 16:29:12 agc Exp $   */
+/*     $NetBSD: fbvar.h,v 1.13 2005/03/17 20:39:17 kleink Exp $        */
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -46,6 +46,7 @@
 
 /* XXX */
 #include <sys/select.h>
+#include <sys/selinfo.h>
 
 /* Hardware cursor information... */
 struct hw_cursor {
diff -r d9022d134b2c -r ffd1fc280d48 sys/net/bpfdesc.h
--- a/sys/net/bpfdesc.h Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/net/bpfdesc.h Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpfdesc.h,v 1.21 2004/11/30 04:28:43 christos Exp $    */
+/*     $NetBSD: bpfdesc.h,v 1.22 2005/03/17 20:39:17 kleink Exp $      */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -42,7 +42,7 @@
 #define _NET_BPFDESC_H_
 
 #include <sys/callout.h>
-#include <sys/select.h>
+#include <sys/selinfo.h>               /* for struct selinfo */
 
 /*
  * Descriptor associated with each open bpf file.
diff -r d9022d134b2c -r ffd1fc280d48 sys/sys/Makefile
--- a/sys/sys/Makefile  Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/sys/Makefile  Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.71 2005/01/02 16:08:30 thorpej Exp $
+#      $NetBSD: Makefile,v 1.72 2005/03/17 20:39:17 kleink Exp $
 
 INCSDIR= /usr/include/sys
 
@@ -22,7 +22,7 @@
        param.h pipe.h pmc.h poll.h pool.h power.h proc.h properties.h \
        protosw.h ptrace.h queue.h \
        ras.h reboot.h radioio.h resource.h resourcevar.h rnd.h \
-       sa.h scanio.h sched.h scsiio.h select.h sem.h sha1.h shm.h \
+       sa.h scanio.h sched.h scsiio.h select.h selinfo.h sem.h sha1.h shm.h \
        siginfo.h signal.h signalvar.h sigtypes.h socket.h \
        socketvar.h sockio.h stat.h statvfs.h syscall.h syscallargs.h \
        sysctl.h stdint.h swap.h syslimits.h syslog.h systm.h \
diff -r d9022d134b2c -r ffd1fc280d48 sys/sys/pipe.h
--- a/sys/sys/pipe.h    Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/sys/pipe.h    Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pipe.h,v 1.15 2005/02/03 19:20:01 perry Exp $ */
+/* $NetBSD: pipe.h,v 1.16 2005/03/17 20:39:17 kleink Exp $ */
 
 /*
  * Copyright (c) 1996 John S. Dyson
@@ -27,7 +27,7 @@
 #define _SYS_PIPE_H_
 
 #ifndef _KERNEL
-#include <sys/select.h>                        /* for struct selinfo */
+#include <sys/selinfo.h>               /* for struct selinfo */
 #endif
 
 /*
diff -r d9022d134b2c -r ffd1fc280d48 sys/sys/select.h
--- a/sys/sys/select.h  Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/sys/select.h  Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: select.h,v 1.21 2005/03/10 00:25:45 kleink Exp $       */
+/*     $NetBSD: select.h,v 1.22 2005/03/17 20:39:17 kleink Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,21 +38,8 @@
 #include <sys/featuretest.h>
 #include <sys/types.h>
 
-#ifdef _NETBSD_SOURCE
-#include <sys/event.h>         /* for struct klist */
-
-/*
- * Used to maintain information about processes that wish to be
- * notified when I/O becomes possible.
- */
-struct selinfo {
-       struct klist    sel_klist;      /* knotes attached to this selinfo */
-       pid_t           sel_pid;        /* process to be notified */
-       uint8_t         sel_collision;  /* non-zero if a collision occurred */
-};
-#endif /* !_NETBSD_SOURCE_ */
-
 #ifdef _KERNEL
+#include <sys/selinfo.h>               /* for struct selinfo */
 #include <sys/signal.h>                        /* for sigset_t */
 
 struct lwp;
diff -r d9022d134b2c -r ffd1fc280d48 sys/sys/selinfo.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/sys/selinfo.h Thu Mar 17 20:39:17 2005 +0000
@@ -0,0 +1,50 @@
+/*     $NetBSD: selinfo.h,v 1.1 2005/03/17 20:39:17 kleink Exp $       */
+
+/*-
+ * Copyright (c) 1992, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)select.h    8.2 (Berkeley) 1/4/94
+*      from: NetBSD: select.h,v 1.21 2005/03/10 00:25:45 kleink Exp
+ */
+
+#ifndef _SYS_SELINFO_H_
+#define        _SYS_SELINFO_H_
+
+#include <sys/event.h>         /* for struct klist */
+
+/*
+ * Used to maintain information about processes that wish to be
+ * notified when I/O becomes possible.
+ */
+struct selinfo {
+       struct klist    sel_klist;      /* knotes attached to this selinfo */
+       pid_t           sel_pid;        /* process to be notified */
+       uint8_t         sel_collision;  /* non-zero if a collision occurred */
+};
+
+#endif /* !_SYS_SELINFO_H_ */
diff -r d9022d134b2c -r ffd1fc280d48 sys/sys/socketvar.h
--- a/sys/sys/socketvar.h       Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/sys/socketvar.h       Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: socketvar.h,v 1.80 2004/09/03 18:14:09 darrenr Exp $   */
+/*     $NetBSD: socketvar.h,v 1.81 2005/03/17 20:39:17 kleink Exp $    */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -34,7 +34,8 @@
 #ifndef _SYS_SOCKETVAR_H_
 #define        _SYS_SOCKETVAR_H_
 
-#include <sys/select.h>                        /* for struct selinfo */
+#include <sys/select.h>
+#include <sys/selinfo.h>               /* for struct selinfo */
 #include <sys/queue.h>
 
 #if !defined(_KERNEL) || defined(LKM)
diff -r d9022d134b2c -r ffd1fc280d48 sys/sys/tty.h
--- a/sys/sys/tty.h     Thu Mar 17 18:44:09 2005 +0000
+++ b/sys/sys/tty.h     Thu Mar 17 20:39:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.h,v 1.66 2005/02/03 19:20:02 perry Exp $   */
+/*     $NetBSD: tty.h,v 1.67 2005/03/17 20:39:18 kleink Exp $  */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -37,7 +37,8 @@
  */
 
 #include <sys/termios.h>
-#include <sys/select.h>                /* For struct selinfo. */
+#include <sys/select.h>
+#include <sys/selinfo.h>       /* For struct selinfo. */
 #include <sys/lock.h>
 #include <sys/queue.h>
 #include <sys/callout.h>



Home | Main Index | Thread Index | Old Index