PERFORCE change 131298 for review

Kip Macy kmacy at FreeBSD.org
Wed Dec 19 22:58:43 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=131298

Change 131298 by kmacy at kmacy:storage:toehead on 2007/12/20 06:58:15

	IFC 131289

Affected files ...

.. //depot/projects/toehead/lib/libc/amd64/Symbol.map#3 integrate
.. //depot/projects/toehead/lib/libc/i386/Symbol.map#3 integrate
.. //depot/projects/toehead/lib/libc/ia64/Symbol.map#3 integrate
.. //depot/projects/toehead/lib/libc/sparc64/Symbol.map#3 integrate
.. //depot/projects/toehead/lib/libc/stdio/Symbol.map#2 integrate
.. //depot/projects/toehead/lib/libc/stdtime/localtime.c#2 integrate
.. //depot/projects/toehead/lib/libc/sys/select.2#2 integrate
.. //depot/projects/toehead/lib/libfetch/Makefile#3 integrate
.. //depot/projects/toehead/lib/libfetch/common.c#3 integrate
.. //depot/projects/toehead/lib/libfetch/fetch.c#3 integrate
.. //depot/projects/toehead/lib/libfetch/ftp.c#3 integrate
.. //depot/projects/toehead/lib/libfetch/http.c#3 integrate
.. //depot/projects/toehead/lib/libthr/pthread.map#3 integrate
.. //depot/projects/toehead/lib/libthr/thread/thr_exit.c#2 integrate
.. //depot/projects/toehead/lib/libthr/thread/thr_syscalls.c#2 integrate
.. //depot/projects/toehead/lib/msun/ld128/s_nanl.c#2 integrate
.. //depot/projects/toehead/lib/msun/ld80/s_nanl.c#2 integrate
.. //depot/projects/toehead/lib/msun/src/math.h#3 integrate
.. //depot/projects/toehead/lib/msun/src/math_private.h#2 integrate
.. //depot/projects/toehead/lib/msun/src/s_nan.c#2 integrate
.. //depot/projects/toehead/share/man/man4/ng_car.4#2 integrate
.. //depot/projects/toehead/share/man/man4/syncache.4#2 integrate
.. //depot/projects/toehead/share/man/man9/BUS_SETUP_INTR.9#2 integrate
.. //depot/projects/toehead/share/man/man9/sf_buf.9#2 integrate
.. //depot/projects/toehead/share/misc/Makefile#2 integrate
.. //depot/projects/toehead/share/misc/bsd-family-tree#2 integrate
.. //depot/projects/toehead/sys/arm/at91/at91.c#3 integrate
.. //depot/projects/toehead/sys/boot/forth/support.4th#2 integrate
.. //depot/projects/toehead/sys/conf/files.powerpc#3 integrate
.. //depot/projects/toehead/sys/dev/aac/aac.c#2 integrate
.. //depot/projects/toehead/sys/dev/mfi/mfi.c#2 integrate
.. //depot/projects/toehead/sys/dev/mfi/mfi_pci.c#2 integrate
.. //depot/projects/toehead/sys/dev/ofw/openpromio.c#2 integrate
.. //depot/projects/toehead/sys/dev/powermac_nvram/powermac_nvram.c#2 integrate
.. //depot/projects/toehead/sys/dev/uart/uart_cpu_powerpc.c#2 integrate
.. //depot/projects/toehead/sys/kern/subr_bus.c#2 integrate
.. //depot/projects/toehead/sys/netgraph/ng_car.c#2 integrate
.. //depot/projects/toehead/sys/netgraph/ng_car.h#2 integrate
.. //depot/projects/toehead/sys/netinet/tcp_offload.c#2 integrate
.. //depot/projects/toehead/sys/netinet/tcp_syncache.c#5 integrate
.. //depot/projects/toehead/sys/powerpc/aim/ofw_machdep.c#2 integrate
.. //depot/projects/toehead/sys/powerpc/conf/NOTES#3 integrate
.. //depot/projects/toehead/sys/powerpc/include/_bus.h#2 integrate
.. //depot/projects/toehead/sys/powerpc/include/bus.h#2 integrate
.. //depot/projects/toehead/sys/powerpc/powermac/grackle.c#2 integrate
.. //depot/projects/toehead/sys/powerpc/powermac/macio.c#2 integrate
.. //depot/projects/toehead/sys/powerpc/powermac/uninorth.c#2 integrate
.. //depot/projects/toehead/sys/powerpc/powerpc/bus_machdep.c#1 branch
.. //depot/projects/toehead/sys/powerpc/psim/iobus.c#2 integrate
.. //depot/projects/toehead/sys/vm/vm_page.c#3 integrate
.. //depot/projects/toehead/sys/vm/vm_phys.c#2 integrate
.. //depot/projects/toehead/tools/regression/bin/mv/regress.sh#2 integrate
.. //depot/projects/toehead/usr.bin/ministat/Makefile#1 branch
.. //depot/projects/toehead/usr.bin/ministat/README#1 branch
.. //depot/projects/toehead/usr.bin/ministat/chameleon#1 branch
.. //depot/projects/toehead/usr.bin/ministat/iguana#1 branch
.. //depot/projects/toehead/usr.bin/ministat/ministat.c#1 branch
.. //depot/projects/toehead/usr.sbin/boot98cfg/boot98cfg.c#2 integrate
.. //depot/projects/toehead/usr.sbin/wpa/wpa_supplicant/Makefile#2 integrate

Differences ...

==== //depot/projects/toehead/lib/libc/amd64/Symbol.map#3 (text) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/lib/libc/amd64/Symbol.map,v 1.5 2007/12/16 21:15:56 das Exp $
+ * $FreeBSD: src/lib/libc/amd64/Symbol.map,v 1.6 2007/12/18 23:46:32 das Exp $
  */
 
 /*
@@ -71,7 +71,4 @@
 	_end;
 	__sys_vfork;
 	_vfork;
-
-	/* used in libm */
-	__ULtox_D2A;
 };

==== //depot/projects/toehead/lib/libc/i386/Symbol.map#3 (text) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/lib/libc/i386/Symbol.map,v 1.6 2007/12/16 21:15:56 das Exp $
+ * $FreeBSD: src/lib/libc/i386/Symbol.map,v 1.7 2007/12/18 23:46:32 das Exp $
  */
 
 /*
@@ -68,7 +68,4 @@
 	_brk;
 	.curbrk;
 	.minbrk;
-
-	/* used in libm */
-	__ULtox_D2A;
 };

==== //depot/projects/toehead/lib/libc/ia64/Symbol.map#3 (text) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/lib/libc/ia64/Symbol.map,v 1.5 2007/12/16 21:15:57 das Exp $
+ * $FreeBSD: src/lib/libc/ia64/Symbol.map,v 1.6 2007/12/18 23:46:32 das Exp $
  */
 
 /*
@@ -69,7 +69,4 @@
 	minbrk;
 	.cerror;
 	curbrk;
-
-	/* used in libm */
-	__ULtox_D2A;
 };

==== //depot/projects/toehead/lib/libc/sparc64/Symbol.map#3 (text) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/lib/libc/sparc64/Symbol.map,v 1.6 2007/12/16 21:15:57 das Exp $
+ * $FreeBSD: src/lib/libc/sparc64/Symbol.map,v 1.7 2007/12/18 23:46:32 das Exp $
  */
 
 /*
@@ -96,7 +96,4 @@
 
 	/* used in src/lib/csu/sparc64/crt1.c */
 	__sparc_utrap_setup;
-
-	/* used in libm */
-	__ULtoQ_D2A;
 };

==== //depot/projects/toehead/lib/libc/stdio/Symbol.map#2 (text) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/lib/libc/stdio/Symbol.map,v 1.5 2007/04/29 14:05:19 deischen Exp $
+ * $FreeBSD: src/lib/libc/stdio/Symbol.map,v 1.6 2007/12/18 23:49:05 das Exp $
  */
 
 FBSD_1.0 {
@@ -108,6 +108,19 @@
 	__swbuf;
 	wprintf;
 	wscanf;
+};
+
+FBSDprivate_1.0 {
+	_flockfile;
+	_flockfile_debug_stub;
+	_flockfile_debug;
+	_ftrylockfile;
+	_funlockfile;
+	__vfscanf;
+
+	/*
+	 * xprintf support
+	 */
 	__use_xprintf;
 	__lowercase_hex;
 	__uppercase_hex;
@@ -136,12 +149,3 @@
 	__printf_arginfo_vis;
 	__printf_render_vis;
 };
-
-FBSDprivate_1.0 {
-	_flockfile;
-	_flockfile_debug_stub;
-	_flockfile_debug;
-	_ftrylockfile;
-	_funlockfile;
-	__vfscanf;
-};

==== //depot/projects/toehead/lib/libc/stdtime/localtime.c#2 (text+ko) ====

@@ -9,7 +9,7 @@
 static char	elsieid[] __unused = "@(#)localtime.c	7.78";
 #endif /* !defined NOID */
 #endif /* !defined lint */
-__FBSDID("$FreeBSD: src/lib/libc/stdtime/localtime.c,v 1.41 2007/01/19 01:16:35 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdtime/localtime.c,v 1.42 2007/12/19 04:30:10 imp Exp $");
 
 /*
 ** Leap second handling from Bradley White (bww at k.gp.cs.cmu.edu).
@@ -1093,14 +1093,16 @@
 	struct tm *p_tm;
 
 	if (__isthreaded != 0) {
-		_pthread_mutex_lock(&localtime_mutex);
 		if (localtime_key < 0) {
-			if (_pthread_key_create(&localtime_key, free) < 0) {
-				_pthread_mutex_unlock(&localtime_mutex);
-				return(NULL);
+			_pthread_mutex_lock(&localtime_mutex);
+			if (localtime_key < 0) {
+				if (_pthread_key_create(&localtime_key, free) < 0) {
+					_pthread_mutex_unlock(&localtime_mutex);
+					return(NULL);
+				}
 			}
+			_pthread_mutex_unlock(&localtime_mutex);
 		}
-		_pthread_mutex_unlock(&localtime_mutex);
 		p_tm = _pthread_getspecific(localtime_key);
 		if (p_tm == NULL) {
 			if ((p_tm = (struct tm *)malloc(sizeof(struct tm)))
@@ -1146,16 +1148,18 @@
 const long		offset;
 struct tm * const	tmp;
 {
-	_MUTEX_LOCK(&gmt_mutex);
 	if (!gmt_is_set) {
-		gmt_is_set = TRUE;
+		_MUTEX_LOCK(&gmt_mutex);
+		if (!gmt_is_set) {
 #ifdef ALL_STATE
-		gmtptr = (struct state *) malloc(sizeof *gmtptr);
-		if (gmtptr != NULL)
+			gmtptr = (struct state *) malloc(sizeof *gmtptr);
+			if (gmtptr != NULL)
 #endif /* defined ALL_STATE */
-			gmtload(gmtptr);
+				gmtload(gmtptr);
+			gmt_is_set = TRUE;
+		}
+		_MUTEX_UNLOCK(&gmt_mutex);
 	}
-	_MUTEX_UNLOCK(&gmt_mutex);
 	timesub(timep, offset, gmtptr, tmp);
 #ifdef TM_ZONE
 	/*
@@ -1187,14 +1191,16 @@
 	struct tm *p_tm;
 
 	if (__isthreaded != 0) {
-		_pthread_mutex_lock(&gmtime_mutex);
 		if (gmtime_key < 0) {
-			if (_pthread_key_create(&gmtime_key, free) < 0) {
-				_pthread_mutex_unlock(&gmtime_mutex);
-				return(NULL);
+			_pthread_mutex_lock(&gmtime_mutex);
+			if (gmtime_key < 0) {
+				if (_pthread_key_create(&gmtime_key, free) < 0) {
+					_pthread_mutex_unlock(&gmtime_mutex);
+					return(NULL);
+				}
 			}
+			_pthread_mutex_unlock(&gmtime_mutex);
 		}
-		_pthread_mutex_unlock(&gmtime_mutex);
 		/*
 		 * Changed to follow POSIX.1 threads standard, which
 		 * is what BSD currently has.

==== //depot/projects/toehead/lib/libc/sys/select.2#2 (text+ko) ====

@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)select.2	8.2 (Berkeley) 3/25/94
-.\" $FreeBSD: src/lib/libc/sys/select.2,v 1.33 2007/01/09 00:28:15 imp Exp $
+.\" $FreeBSD: src/lib/libc/sys/select.2,v 1.34 2007/12/19 03:33:13 imp Exp $
 .\"
 .Dd November 17, 2002
 .Dt SELECT 2
@@ -222,3 +222,6 @@
 by the
 .Fn select
 system call.
+.Fx 
+does not modify the return value, which can cause problems for applications
+ported from other systems.

==== //depot/projects/toehead/lib/libfetch/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libfetch/Makefile,v 1.50 2007/12/14 10:26:58 des Exp $
+# $FreeBSD: src/lib/libfetch/Makefile,v 1.51 2007/12/19 05:10:07 ru Exp $
 
 .include <bsd.own.mk>
 
@@ -27,9 +27,9 @@
 
 SHLIB_MAJOR=    5
 
-ftperr.h: ftp.errors
+ftperr.h: ftp.errors ${.CURDIR}/Makefile
 	@echo "static struct fetcherr ftp_errlist[] = {" > ${.TARGET}
-	@cat ${.ALLSRC} \
+	@cat ${.CURDIR}/ftp.errors \
 	  | grep -v ^# \
 	  | sort \
 	  | while read NUM CAT STRING; do \
@@ -38,9 +38,9 @@
 	@echo "    { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET}
 	@echo "};" >> ${.TARGET}
 
-httperr.h: http.errors
+httperr.h: http.errors ${.CURDIR}/Makefile
 	@echo "static struct fetcherr http_errlist[] = {" > ${.TARGET}
-	@cat ${.ALLSRC} \
+	@cat ${.CURDIR}/http.errors \
 	  | grep -v ^# \
 	  | sort \
 	  | while read NUM CAT STRING; do \

==== //depot/projects/toehead/lib/libfetch/common.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libfetch/common.c,v 1.52 2007/12/18 11:03:07 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libfetch/common.c,v 1.53 2007/12/19 00:26:36 des Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -763,12 +763,12 @@
 	p = no_proxy;
 	do {
 		/* position p at the beginning of a domain suffix */
-		while (*p == ',' || isspace((int)*p))
+		while (*p == ',' || isspace((unsigned char)*p))
 			p++;
 
 		/* position q at the first separator character */
 		for (q = p; *q; ++q)
-			if (*q == ',' || isspace((int)*q))
+			if (*q == ',' || isspace((unsigned char)*q))
 				break;
 
 		d_len = q - p;

==== //depot/projects/toehead/lib/libfetch/fetch.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libfetch/fetch.c,v 1.40 2007/12/18 10:41:12 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libfetch/fetch.c,v 1.41 2007/12/19 00:26:36 des Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -369,7 +369,7 @@
 	/* port */
 	if (*p == ':') {
 		for (q = ++p; *q && (*q != '/'); q++)
-			if (isdigit((int)*q))
+			if (isdigit((unsigned char)*q))
 				u->port = u->port * 10 + (*q - '0');
 			else {
 				/* invalid port */
@@ -395,7 +395,7 @@
 		}
 		u->doc = doc;
 		while (*p != '\0') {
-			if (!isspace((int)*p)) {
+			if (!isspace((unsigned char)*p)) {
 				*doc++ = *p++;
 			} else {
 				*doc++ = '%';

==== //depot/projects/toehead/lib/libfetch/ftp.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libfetch/ftp.c,v 1.99 2007/12/18 11:03:07 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libfetch/ftp.c,v 1.100 2007/12/19 00:26:36 des Exp $");
 
 /*
  * Portions of this code were taken from or based on ftpio.c:
@@ -102,11 +102,16 @@
 static struct url cached_host;
 static conn_t	*cached_connection;
 
-#define isftpreply(foo) (isdigit((int)foo[0]) && isdigit((int)foo[1]) \
-			 && isdigit((int)foo[2]) \
-			 && (foo[3] == ' ' || foo[3] == '\0'))
-#define isftpinfo(foo) (isdigit((int)foo[0]) && isdigit((int)foo[1]) \
-			&& isdigit((int)foo[2]) && foo[3] == '-')
+#define isftpreply(foo)				\
+	(isdigit((unsigned char)foo[0]) &&	\
+	    isdigit((unsigned char)foo[1]) &&	\
+	    isdigit((unsigned char)foo[2]) &&	\
+	    (foo[3] == ' ' || foo[3] == '\0'))
+#define isftpinfo(foo) \
+	(isdigit((unsigned char)foo[0]) &&	\
+	    isdigit((unsigned char)foo[1]) &&	\
+	    isdigit((unsigned char)foo[2]) &&	\
+	    foo[3] == '-')
 
 /*
  * Translate IPv4 mapped IPv6 address to IPv4 address
@@ -150,7 +155,8 @@
 		}
 	}
 
-	while (conn->buflen && isspace((int)conn->buf[conn->buflen - 1]))
+	while (conn->buflen &&
+	    isspace((unsigned char)conn->buf[conn->buflen - 1]))
 		conn->buflen--;
 	conn->buf[conn->buflen] = '\0';
 
@@ -414,11 +420,11 @@
 		ftp_seterr(e);
 		return (-1);
 	}
-	for (ln = conn->buf + 4; *ln && isspace((int)*ln); ln++)
+	for (ln = conn->buf + 4; *ln && isspace((unsigned char)*ln); ln++)
 		/* nothing */ ;
-	for (us->size = 0; *ln && isdigit((int)*ln); ln++)
+	for (us->size = 0; *ln && isdigit((unsigned char)*ln); ln++)
 		us->size = us->size * 10 + *ln - '0';
-	if (*ln && !isspace((int)*ln)) {
+	if (*ln && !isspace((unsigned char)*ln)) {
 		ftp_seterr(FTP_PROTOCOL_ERROR);
 		us->size = -1;
 		return (-1);
@@ -432,7 +438,7 @@
 		ftp_seterr(e);
 		return (-1);
 	}
-	for (ln = conn->buf + 4; *ln && isspace((int)*ln); ln++)
+	for (ln = conn->buf + 4; *ln && isspace((unsigned char)*ln); ln++)
 		/* nothing */ ;
 	switch (strspn(ln, "0123456789")) {
 	case 14:
@@ -691,7 +697,7 @@
 		switch (e) {
 		case FTP_PASSIVE_MODE:
 		case FTP_LPASSIVE_MODE:
-			for (p = ln + 3; *p && !isdigit((int)*p); p++)
+			for (p = ln + 3; *p && !isdigit((unsigned char)*p); p++)
 				/* nothing */ ;
 			if (!*p) {
 				e = FTP_PROTOCOL_ERROR;

==== //depot/projects/toehead/lib/libfetch/http.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libfetch/http.c,v 1.81 2007/12/18 11:03:07 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libfetch/http.c,v 1.82 2007/12/19 00:26:36 des Exp $");
 
 /*
  * The following copyright applies to the base64 code:
@@ -137,15 +137,15 @@
 	if (fetch_getln(io->conn) == -1)
 		return (-1);
 
-	if (io->conn->buflen < 2 || !isxdigit((int)*io->conn->buf))
+	if (io->conn->buflen < 2 || !isxdigit((unsigned char)*io->conn->buf))
 		return (-1);
 
-	for (p = io->conn->buf; *p && !isspace((int)*p); ++p) {
+	for (p = io->conn->buf; *p && !isspace((unsigned char)*p); ++p) {
 		if (*p == ';')
 			break;
-		if (!isxdigit((int)*p))
+		if (!isxdigit((unsigned char)*p))
 			return (-1);
-		if (isdigit((int)*p)) {
+		if (isdigit((unsigned char)*p)) {
 			io->chunksize = io->chunksize * 16 +
 			    *p - '0';
 		} else {
@@ -417,8 +417,10 @@
 			return (HTTP_PROTOCOL_ERROR);
 		p += 4;
 	}
-	if (*p != ' ' || !isdigit((int)p[1]) ||
-	    !isdigit((int)p[2]) || !isdigit((int)p[3]))
+	if (*p != ' ' ||
+	    !isdigit((unsigned char)p[1]) ||
+	    !isdigit((unsigned char)p[2]) ||
+	    !isdigit((unsigned char)p[3]))
 		return (HTTP_PROTOCOL_ERROR);
 
 	conn->err = (p[1] - '0') * 100 + (p[2] - '0') * 10 + (p[3] - '0');
@@ -436,7 +438,7 @@
 		/* nothing */;
 	if (*str || *hdr != ':')
 		return (NULL);
-	while (*hdr && isspace((int)*++hdr))
+	while (*hdr && isspace((unsigned char)*++hdr))
 		/* nothing */;
 	return (hdr);
 }
@@ -451,7 +453,7 @@
 
 	if (fetch_getln(conn) == -1)
 		return (hdr_syserror);
-	while (conn->buflen && isspace((int)conn->buf[conn->buflen - 1]))
+	while (conn->buflen && isspace((unsigned char)conn->buf[conn->buflen - 1]))
 		conn->buflen--;
 	conn->buf[conn->buflen] = '\0';
 	if (conn->buflen == 0)
@@ -500,7 +502,7 @@
 {
 	off_t len;
 
-	for (len = 0; *p && isdigit((int)*p); ++p)
+	for (len = 0; *p && isdigit((unsigned char)*p); ++p)
 		len = len * 10 + (*p - '0');
 	if (*p)
 		return (-1);
@@ -525,16 +527,16 @@
 		first = last = -1;
 		++p;
 	} else {
-		for (first = 0; *p && isdigit((int)*p); ++p)
+		for (first = 0; *p && isdigit((unsigned char)*p); ++p)
 			first = first * 10 + *p - '0';
 		if (*p != '-')
 			return (-1);
-		for (last = 0, ++p; *p && isdigit((int)*p); ++p)
+		for (last = 0, ++p; *p && isdigit((unsigned char)*p); ++p)
 			last = last * 10 + *p - '0';
 	}
 	if (first > last || *p != '/')
 		return (-1);
-	for (len = 0, ++p; *p && isdigit((int)*p); ++p)
+	for (len = 0, ++p; *p && isdigit((unsigned char)*p); ++p)
 		len = len * 10 + *p - '0';
 	if (*p || len < last - first + 1)
 		return (-1);
@@ -750,7 +752,7 @@
 
 	comment = tag = 0;
 	while ((line = fgetln(in, &len)) != NULL) {
-		while (len && isspace((int)line[len - 1]))
+		while (len && isspace((unsigned char)line[len - 1]))
 			--len;
 		for (p = q = line; q < line + len; ++q) {
 			if (comment && *q == '-') {

==== //depot/projects/toehead/lib/libthr/pthread.map#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/lib/libthr/pthread.map,v 1.20 2007/12/14 06:25:57 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/pthread.map,v 1.21 2007/12/20 04:32:28 davidxu Exp $
  */
 
 /*
@@ -169,7 +169,6 @@
 	system;
 	tcdrain;
 	usleep;
-	vfork;
 	wait;
 	wait3;
 	wait4;
@@ -366,7 +365,6 @@
 	_spinlock;
 	_spinlock_debug;
 	_spinunlock;
-	_vfork;
 
 	/* Debugger needs these. */
 	_libthr_debug;

==== //depot/projects/toehead/lib/libthr/thread/thr_exit.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_exit.c,v 1.23 2007/01/12 07:26:20 imp Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_exit.c,v 1.24 2007/12/20 04:40:12 davidxu Exp $
  */
 
 #include <errno.h>
@@ -100,7 +100,7 @@
 	/* Save the return value: */
 	curthread->ret = status;
 	while (curthread->cleanup != NULL) {
-		pthread_cleanup_pop(1);
+		_pthread_cleanup_pop(1);
 	}
 
 	/* Check if there is thread specific data: */

==== //depot/projects/toehead/lib/libthr/thread/thr_syscalls.c#2 (text+ko) ====

@@ -28,7 +28,7 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_syscalls.c,v 1.16 2007/01/12 07:26:21 imp Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_syscalls.c,v 1.17 2007/12/20 04:32:28 davidxu Exp $
  */
 
 /*
@@ -149,7 +149,6 @@
 pid_t	__wait4(pid_t, int *, int, struct rusage *);
 ssize_t	__write(int, const void *, size_t);
 ssize_t	__writev(int, const struct iovec *, int);
-int	_vfork(void);
 
 __weak_reference(__accept, accept);
 
@@ -529,14 +528,6 @@
 	return (ret);
 }
 
-__weak_reference(_vfork, vfork);
-
-int
-_vfork(void)
-{
-	return (fork());
-}
-
 __weak_reference(___wait, wait);
 
 pid_t

==== //depot/projects/toehead/lib/msun/ld128/s_nanl.c#2 (text+ko) ====

@@ -23,25 +23,24 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/msun/ld128/s_nanl.c,v 1.1 2007/12/16 21:19:28 das Exp $
+ * $FreeBSD: src/lib/msun/ld128/s_nanl.c,v 1.2 2007/12/18 23:46:31 das Exp $
  */
 
 #include <math.h>
 
 #include "fpmath.h"
-#include "../../../contrib/gdtoa/gdtoaimp.h"
+#include "../src/math_private.h"
 
 long double
 nanl(const char *s)
 {
-	static FPI fpi = { 113, -16494, 16271, 1, SI };
+	union {
+		union IEEEl2bits ieee;
+		uint32_t bits[4];
+	} u;
 
-	union IEEEl2bits result;
-	ULong bits[2];
-	int k;
-
-	s--;
-	k = hexnan(&s, &fpi, bits);
-        ULtoQ((UShort *)&result.e, bits, 16272, k);
-	return (result.e);
+	_scan_nan(u.bits, 4, s);
+	u.ieee.bits.exp = 0x7fff;
+	u.ieee.bits.manh |= 1 << 47;	/* make it a quiet NaN */
+	return (u.ieee.e);
 }

==== //depot/projects/toehead/lib/msun/ld80/s_nanl.c#2 (text+ko) ====

@@ -23,25 +23,24 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/msun/ld80/s_nanl.c,v 1.1 2007/12/16 21:19:28 das Exp $
+ * $FreeBSD: src/lib/msun/ld80/s_nanl.c,v 1.2 2007/12/18 23:46:31 das Exp $
  */
 
 #include <math.h>
 
 #include "fpmath.h"
-#include "../../../contrib/gdtoa/gdtoaimp.h"
+#include "../src/math_private.h"
 
 long double
 nanl(const char *s)
 {
-	static FPI fpi = { 64, -16445, 16320, 1, SI };
+	union {
+		union IEEEl2bits ieee;
+		uint32_t bits[3];
+	} u;
 
-	union IEEEl2bits result;
-	ULong bits[2];
-	int k;
-
-	s--;
-	k = hexnan(&s, &fpi, bits);
-        ULtox((UShort *)&result.e, bits, 16321, k);
-	return (result.e);
+	_scan_nan(u.bits, 3, s);
+	u.ieee.bits.exp = 0x7fff;
+	u.ieee.bits.manh |= 0xc0000000;	/* make it a quiet NaN */
+	return (u.ieee.e);
 }

==== //depot/projects/toehead/lib/msun/src/math.h#3 (text+ko) ====

@@ -11,7 +11,7 @@
 
 /*
  * from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD: src/lib/msun/src/math.h,v 1.63 2007/12/16 21:19:28 das Exp $
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.65 2007/12/20 03:16:55 das Exp $
  */
 
 #ifndef _MATH_H_
@@ -436,10 +436,10 @@
 long double	log10l(long double);
 long double	log1pl(long double);
 long double	log2l(long double);
+#endif
 long double	logbl(long double);
-#endif
+#if 0
 long double	logl(long double);
-#if 0
 long		lrintl(long double);
 #endif
 long		lroundl(long double);

==== //depot/projects/toehead/lib/msun/src/math_private.h#2 (text+ko) ====

@@ -11,7 +11,7 @@
 
 /*
  * from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD: src/lib/msun/src/math_private.h,v 1.20 2005/11/28 04:58:57 bde Exp $
+ * $FreeBSD: src/lib/msun/src/math_private.h,v 1.21 2007/12/18 23:46:32 das Exp $
  */
 
 #ifndef _MATH_PRIVATE_H_
@@ -154,6 +154,11 @@
   (d) = sf_u.value;						\
 } while (0)
 
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
 #ifdef _COMPLEX_H
 /*
  * Inline functions that can be used to construct complex values.

==== //depot/projects/toehead/lib/msun/src/s_nan.c#2 (text+ko) ====

@@ -23,42 +23,86 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/msun/src/s_nan.c,v 1.1 2007/12/16 21:19:28 das Exp $
+ * $FreeBSD: src/lib/msun/src/s_nan.c,v 1.2 2007/12/18 23:46:32 das Exp $
  */
 
+#include <sys/endian.h>
+#include <ctype.h>
 #include <float.h>
 #include <math.h>
+#include <stdint.h>
+#include <strings.h>
 
-#include "../../../contrib/gdtoa/gdtoaimp.h"
 #include "math_private.h"
 
+/*
+ * Scan a string of hexadecimal digits (the format nan(3) expects) and
+ * make a bit array (using the local endianness). We stop when we
+ * encounter an invalid character, NUL, etc.  If we overflow, we do
+ * the same as gcc's __builtin_nan(), namely, discard the high order bits.
+ *
+ * The format this routine accepts needs to be compatible with what is used
+ * in contrib/gdtoa/hexnan.c (for strtod/scanf) and what is used in
+ * __builtin_nan(). In fact, we're only 100% compatible for strings we
+ * consider valid, so we might be violating the C standard. But it's
+ * impossible to use nan(3) portably anyway, so this seems good enough.
+ */
+void
+_scan_nan(uint32_t *words, int num_words, const char *s)
+{
+	int si;		/* index into s */
+	int bitpos;	/* index into words (in bits) */
+
+	bzero(words, num_words * sizeof(uint32_t));
+
+	/* Allow a leading '0x'. (It's expected, but redundant.) */
+	if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
+		s += 2;
+
+	/* Scan forwards in the string, looking for the end of the sequence. */
+	for (si = 0; isxdigit(s[si]); si++)
+		;
+
+	/* Scan backwards, filling in the bits in words[] as we go. */
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	for (bitpos = 0; bitpos < 32 * num_words; bitpos += 4) {
+#else
+	for (bitpos = 32 * num_words - 4; bitpos >= 0; bitpos -= 4) {
+#endif
+		if (--si < 0)
+			break;
+		words[bitpos / 32] |= digittoint(s[si]) << (bitpos % 32);
+	}
+}
+
 double
 nan(const char *s)
 {
-	static FPI fpi = { 52, -1074, 971, 1, SI };
+	union {
+		double d;
+		uint32_t bits[2];
+	} u;
 
-	double result;
-	ULong bits[2];
-
-	s--;
-	hexnan(&s, &fpi, bits);
-	SET_HIGH_WORD(result, 0x7ff80000 | bits[1]);
-	SET_LOW_WORD(result, bits[0]);
-	return (result);
+	_scan_nan(u.bits, 2, s);
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	u.bits[1] |= 0x7ff80000;
+#else
+	u.bits[0] |= 0x7ff80000;
+#endif
+	return (u.d);
 }
 
 float
 nanf(const char *s)
 {
-	static FPI fpi = { 24, -149, 104, 1, SI };
+	union {
+		float f;
+		uint32_t bits[1];
+	} u;
 
-	float result;
-	ULong bits[1];
-
-	s--;
-	hexnan(&s, &fpi, bits);
-	SET_FLOAT_WORD(result, 0x7fc00000 | bits[0]);
-	return (result);
+	_scan_nan(u.bits, 1, s);
+	u.bits[0] |= 0x7fc00000;
+	return (u.f);
 }
 
 #if (LDBL_MANT_DIG == 53)

==== //depot/projects/toehead/share/man/man4/ng_car.4#2 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/ng_car.4,v 1.5 2007/10/31 18:33:23 mav Exp $
+.\" $FreeBSD: src/share/man/man4/ng_car.4,v 1.6 2007/12/19 23:12:37 mav Exp $
 .\"
 .Dd March 11, 2007
 .Dt NG_CAR 4
@@ -108,6 +108,9 @@
 links with bandwidth * delay product less than 6-8 TCP segments, but it
 consumes additional system resources for queue processing.
 .El
+By default, all information rates are measured in bits per second and bursts
+are measured in bytes. But when NG_CAR_COUNT_PACKETS option is enabled,
+rates are measured in packets per second and bursts are in packets.
 .Sh CONTROL MESSAGES
 This node type supports the generic control messages and the following
 specific messages.
@@ -120,17 +123,34 @@
 .Vt "struct ng_car_bulkconf"
 .Bd -literal
 struct ng_car_hookconf {
-	u_int64_t cbs;		/* Committed burst size (bytes) */
-	u_int64_t ebs;		/* Exceeded/Peak burst size (bytes) */
-	u_int64_t cir;		/* Committed information rate (bits/s) */
-	u_int64_t pir;		/* Peak information rate (bits/s) */
+	u_int64_t cbs;		/* Committed burst size */
+	u_int64_t ebs;		/* Exceeded/Peak burst size */
+	u_int64_t cir;		/* Committed information rate */
+	u_int64_t pir;		/* Peak information rate */
 	u_int8_t green_action;	/* Action for green packets */
 	u_int8_t yellow_action;	/* Action for yellow packets */
 	u_int8_t red_action;	/* Action for red packets */
-	u_int8_t mode;		/* single/double rate, ... */
-	u_int8_t opt;		/* color-aware or color-blind */
+	u_int8_t mode;		/* operation mode */
+	u_int8_t opt;		/* mode options */
+};
+
+/* possible actions (..._action) */
+enum {
+    NG_CAR_ACTION_FORWARD = 1,
+    NG_CAR_ACTION_DROP
+};
+
+/* operation modes (mode) */
+enum {
+    NG_CAR_SINGLE_RATE = 0,
+    NG_CAR_DOUBLE_RATE,
+    NG_CAR_RED,
+    NG_CAR_SHAPE
 };
 
+/* mode options (opt) */
+#define NG_CAR_COUNT_PACKETS	2
+  
 struct ng_car_bulkconf {
 	struct ng_car_hookconf upstream;
 	struct ng_car_hookconf downstream;

==== //depot/projects/toehead/share/man/man4/syncache.4#2 (text+ko) ====

@@ -10,9 +10,9 @@
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
 .\"
-.\" $FreeBSD: src/share/man/man4/syncache.4,v 1.3 2006/04/11 15:30:13 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/syncache.4,v 1.4 2007/12/19 16:58:54 ru Exp $
 .\"
-.Dd August 31, 2001
+.Dd December 18, 2007
 .Dt SYNCACHE 4
 .Os
 .Sh NAME
@@ -132,7 +132,7 @@
 .Xr loader 8 .
 .It Va rexmtlimit
 Maximum number of times a SYN,ACK is retransmitted before being discarded.
-The default of 3 retransmits corresponds to a 15 second timeout, this value
+The default of 3 retransmits corresponds to a 45 second timeout, this value
 may be increased depending on the RTT to client machines.
 Tunable via
 .Xr sysctl 3 .

==== //depot/projects/toehead/share/man/man9/BUS_SETUP_INTR.9#2 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/BUS_SETUP_INTR.9,v 1.20 2007/03/01 14:33:29 ru Exp $
+.\" $FreeBSD: src/share/man/man9/BUS_SETUP_INTR.9,v 1.22 2007/12/19 08:01:24 brueffer Exp $
 .\"
-.Dd March 1, 2007
+.Dd December 18, 2007
 .Dt BUS_SETUP_INTR 9
 .Os
 .Sh NAME
@@ -90,6 +90,9 @@
 that will not execute any potentially blocking operation, use the
 .Fa filter
 argument.
+See the
+.Sx "Filter Routine" 
+section below for information on writing a filter.
 Otherwise, use the
 .Fa ithread
 argument.
@@ -97,6 +100,9 @@
 will be called with the value
 .Fa arg
 as its only argument.
+See the
+.Sx "ithread Routine" 
+section below for more information on writing an interrupt handler.
 .Pp
 The
 .Fa cookiep
@@ -121,13 +127,86 @@
 will no longer be called.
 .Pp
 Mutexes are not allowed to be held across calls to these functions.
+.Ss "Filter Routines"
+A filter runs in a context very similar to what was known as an
+.Dv INTR_FAST
+routine in previous versions of 
+.Fx .
+In this context, normal mutexes cannot be used.

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list