Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/rpc Introduce a binary compatible __fd_set_256 that...
details: https://anonhg.NetBSD.org/src/rev/8ef3d49d69b4
branches: trunk
changeset: 341457:8ef3d49d69b4
user: christos <christos%NetBSD.org@localhost>
date: Sat Nov 07 00:42:04 2015 +0000
description:
Introduce a binary compatible __fd_set_256 that is what the original fdset
size was for libc. Now we can bump it.
diffstat:
lib/libc/rpc/rpc_commondata.c | 7 ++++---
lib/libc/rpc/svc_fdset.c | 20 ++++++++++++--------
lib/libc/rpc/svc_fdset.h | 6 +++++-
3 files changed, 21 insertions(+), 12 deletions(-)
diffs (109 lines):
diff -r eb0c7419d19a -r 8ef3d49d69b4 lib/libc/rpc/rpc_commondata.c
--- a/lib/libc/rpc/rpc_commondata.c Sat Nov 07 00:12:57 2015 +0000
+++ b/lib/libc/rpc/rpc_commondata.c Sat Nov 07 00:42:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_commondata.c,v 1.11 2015/11/06 23:11:09 christos Exp $ */
+/* $NetBSD: rpc_commondata.c,v 1.12 2015/11/07 00:42:04 christos Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -38,11 +38,12 @@
#if 0
static char *sccsid = "@(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rpc_commondata.c,v 1.11 2015/11/06 23:11:09 christos Exp $");
+__RCSID("$NetBSD: rpc_commondata.c,v 1.12 2015/11/07 00:42:04 christos Exp $");
#endif
#endif
#include <rpc/rpc.h>
+#include "svc_fdset.h"
/*
* This file should only contain common data (global data) that is exported
@@ -50,7 +51,7 @@
*/
struct opaque_auth _null_auth;
#undef svc_fdset
-fd_set svc_fdset;
+__fd_set_256 svc_fdset;
#undef svc_maxfd
int svc_maxfd = -1;
#ifndef _REENTRANT
diff -r eb0c7419d19a -r 8ef3d49d69b4 lib/libc/rpc/svc_fdset.c
--- a/lib/libc/rpc/svc_fdset.c Sat Nov 07 00:12:57 2015 +0000
+++ b/lib/libc/rpc/svc_fdset.c Sat Nov 07 00:42:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.c,v 1.4 2015/11/06 23:11:09 christos Exp $ */
+/* $NetBSD: svc_fdset.c,v 1.5 2015/11/07 00:42:04 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: svc_fdset.c,v 1.4 2015/11/06 23:11:09 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.5 2015/11/07 00:42:04 christos Exp $");
#include "reentrant.h"
@@ -39,12 +39,20 @@
#include <rpc/rpc.h>
+#ifdef FDSET_DEBUG
+#include <stdio.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <lwp.h>
+#endif
#include <stdlib.h>
#include <string.h>
+#include "svc_fdset.h"
+
#undef svc_fdset
#undef svc_maxfd
-extern fd_set svc_fdset;
+extern __fd_set_256 svc_fdset;
extern int svc_maxfd;
struct svc_fdset {
@@ -59,10 +67,6 @@
static thread_key_t fdsetkey = -2;
#ifdef FDSET_DEBUG
-#include <stdio.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <lwp.h>
static void __printflike(3, 0)
svc_header(const char *func, size_t line, const char *fmt, va_list ap)
@@ -123,7 +127,7 @@
fds->fdmax--;
/* Compat update */
if (fds == &__svc_fdset) {
- svc_fdset = *__svc_fdset.fdset;
+ svc_fdset = *(__fd_set_256 *)__svc_fdset.fdset;
svc_maxfd = __svc_fdset.fdmax;
}
}
diff -r eb0c7419d19a -r 8ef3d49d69b4 lib/libc/rpc/svc_fdset.h
--- a/lib/libc/rpc/svc_fdset.h Sat Nov 07 00:12:57 2015 +0000
+++ b/lib/libc/rpc/svc_fdset.h Sat Nov 07 00:42:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.h,v 1.2 2015/11/06 19:34:13 christos Exp $ */
+/* $NetBSD: svc_fdset.h,v 1.3 2015/11/07 00:42:04 christos Exp $ */
# ifdef RUMP_RPC
# include <rump/rump.h>
@@ -16,3 +16,7 @@
# undef select
# define select(a, b, c, d, e) rump_sys_select(a, b, c, d, e)
# endif
+
+typedef struct __fd_set_256 {
+ __fd_mask fds_bits[__NFD_LEN(256)];
+} __fd_set_256;
Home |
Main Index |
Thread Index |
Old Index