PERFORCE change 133102 for review
John Birrell
jb at FreeBSD.org
Fri Jan 11 21:16:25 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=133102
Change 133102 by jb at jb_freebsd1 on 2008/01/12 05:15:42
IFC
Affected files ...
.. //depot/projects/dtrace/doc/share/pgpkeys/marius.key#1 branch
.. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#30 integrate
.. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#29 integrate
.. //depot/projects/dtrace/ports/GIDs#13 integrate
.. //depot/projects/dtrace/ports/UIDs#15 integrate
.. //depot/projects/dtrace/src/ObsoleteFiles.inc#34 integrate
.. //depot/projects/dtrace/src/etc/namedb/named.conf#5 integrate
.. //depot/projects/dtrace/src/lib/libkvm/kvm.c#7 integrate
.. //depot/projects/dtrace/src/lib/msun/src/s_csqrt.c#2 integrate
.. //depot/projects/dtrace/src/lib/msun/src/s_csqrtf.c#2 integrate
.. //depot/projects/dtrace/src/sys/amd64/include/ieeefp.h#5 integrate
.. //depot/projects/dtrace/src/sys/dev/fdc/fdc.c#10 integrate
.. //depot/projects/dtrace/src/sys/i386/include/ieeefp.h#4 integrate
.. //depot/projects/dtrace/src/sys/kern/kern_lock.c#15 integrate
.. //depot/projects/dtrace/src/sys/nfsclient/nfs_socket.c#15 integrate
.. //depot/projects/dtrace/src/usr.bin/systat/ifstat.c#6 integrate
.. //depot/projects/dtrace/www/en/java/news.xml#1 branch
.. //depot/projects/dtrace/www/share/sgml/libcommon.xsl#7 integrate
.. //depot/projects/dtrace/www/share/sgml/templates.oldnewsflash.xsl#5 integrate
.. //depot/projects/dtrace/www/share/sgml/templates.oldpress.xsl#5 integrate
.. //depot/projects/dtrace/www/share/sgml/templates.press.xsl#3 integrate
Differences ...
==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#30 (text+ko) ====
@@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
- $FreeBSD: doc/share/pgpkeys/pgpkeys-developers.sgml,v 1.60 2008/01/04 21:00:54 wxs Exp $
+ $FreeBSD: doc/share/pgpkeys/pgpkeys-developers.sgml,v 1.61 2008/01/11 21:48:49 marius Exp $
-->
<sect2 id="pgpkey-ariff">
@@ -1044,6 +1044,11 @@
&pgpkey.xride;
</sect2>
+ <sect2 id="pgpkey-marius">
+ <title>&a.marius;</title>
+ &pgpkey.marius;
+ </sect2>
+
<sect2 id="pgpkey-clsung">
<title>&a.clsung;</title>
&pgpkey.clsung;
==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#29 (text+ko) ====
@@ -1,5 +1,5 @@
-<!-- $FreeBSD: doc/share/pgpkeys/pgpkeys.ent,v 1.156 2008/01/04 21:00:54 wxs Exp $ -->
+<!-- $FreeBSD: doc/share/pgpkeys/pgpkeys.ent,v 1.157 2008/01/11 21:48:49 marius Exp $ -->
<!-- PGP keyblocks -->
<!ENTITY pgpkey.aaron SYSTEM "aaron.key">
<!ENTITY pgpkey.ache SYSTEM "ache.key">
@@ -155,6 +155,7 @@
<!ENTITY pgpkey.marcel SYSTEM "marcel.key">
<!ENTITY pgpkey.marck SYSTEM "marck.key">
<!ENTITY pgpkey.marcus SYSTEM "marcus.key">
+<!ENTITY pgpkey.marius SYSTEM "marius.key">
<!ENTITY pgpkey.markp SYSTEM "markp.key">
<!ENTITY pgpkey.marks SYSTEM "marks.key">
<!ENTITY pgpkey.markus SYSTEM "markus.key">
==== //depot/projects/dtrace/ports/GIDs#13 (text+ko) ====
@@ -1,4 +1,4 @@
-$FreeBSD: ports/GIDs,v 1.47 2007/09/07 03:08:58 edwin Exp $
+$FreeBSD: ports/GIDs,v 1.48 2008/01/11 15:46:29 rafan Exp $
# Please keep this file sorted by GID!
smmsp:*:25:
bind:*:53:
@@ -92,6 +92,7 @@
dkfilter:*:325:
wildfire:*:340:
stunnel:*:341:
+_iodined:*:353:
ldap:*:389:
tiarra:*:398:
drweb:*:426:
==== //depot/projects/dtrace/ports/UIDs#15 (text+ko) ====
@@ -1,4 +1,4 @@
-$FreeBSD: ports/UIDs,v 1.52 2007/09/30 07:19:48 edwin Exp $
+$FreeBSD: ports/UIDs,v 1.53 2008/01/11 15:46:29 rafan Exp $
# Please keep this file sorted by UID!
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
@@ -102,6 +102,7 @@
dkfilter:*:325:325:DK Filter Owner:/nonexistent:/usr/sbin/nologin
wildfire:*:340:340::0:0:Wildfire Daemon:/nonexistent:/usr/sbin/nologin
stunnel:*:341:341::0:0:Stunnel Daemon:/nonexistent:/usr/sbin/nologin
+_iodined:*:353:353:Iodine Daemon:/nonexistent:/usr/sbin/nologin
ldap:*:389:389:OpenLDAP Server:/nonexistent:/usr/sbin/nologin
tiarra:*:398:398:Tiarra IRC Proxy:/nonexistent:/usr/sbin/nologin
drweb:*:426:426:Dr.Web Mail Scanner:/nonexistent:/usr/sbin/nologin
==== //depot/projects/dtrace/src/ObsoleteFiles.inc#34 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.124 2007/12/07 22:56:10 dougb Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.125 2008/01/11 13:41:31 jhb Exp $
#
# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
# directories (OLD_DIRS) which should get removed at an update. Recently
@@ -14,6 +14,9 @@
# The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
#
+# 20080108: Moved to section 2
+OLD_FILES+=usr/share/man/man3/shm_open.3.gz
+OLD_FILES+=usr/share/man/man3/shm_unlink.3.gz
# 20071207: Merged with fortunes-o.real
OLD_FILES+=usr/share/games/fortune/fortunes2-o
OLD_FILES+=usr/share/games/fortune/fortunes2-o.dat
@@ -25,6 +28,8 @@
.endif
# 20071129: Removed a Solaris compatibility header
OLD_FILES+=usr/include/sys/_elf_solaris.h
+# 20071125: Renamed to pmc_get_msr()
+OLD_FILES+=usr/share/man/man3/pmc_x86_get_msr.3.gz
# 20071108: Removed very crunch OLDCARD support file
OLD_FILES+=etc/defaults/pccard.conf
# 20071104: Removed bsdlabel, fdisk and gpt from rescue on ia64.
@@ -33,6 +38,8 @@
OLD_FILES+=rescue/fdisk
OLD_FILES+=rescue/gpt
.endif
+# 20071026: kthread(9)/kproc(9) API changes
+OLD_FILES+=usr/share/man/man9/kthread_create.9.gz
# 20071025: rc.d/nfslocking superceeded by rc.d/lockd and rc.d/statd
OLD_FILES+=etc/rc.d/nfslocking
# 20070930: rename of cached to nscd
==== //depot/projects/dtrace/src/etc/namedb/named.conf#5 (text+ko) ====
@@ -1,4 +1,4 @@
-// $FreeBSD: src/etc/namedb/named.conf,v 1.26 2007/08/17 04:37:02 dougb Exp $
+// $FreeBSD: src/etc/namedb/named.conf,v 1.27 2008/01/11 22:41:21 dougb Exp $
//
// Refer to the named.conf(5) and named(8) man pages, and the documentation
// in /usr/share/doc/bind9 for more details.
@@ -121,14 +121,6 @@
// "This" Network (RFCs 1912 and 3330)
zone "0.in-addr.arpa" { type master; file "master/empty.db"; };
-// IANA Reserved - Unlikely to ever be assigned
-zone "1.in-addr.arpa" { type master; file "master/empty.db"; };
-zone "2.in-addr.arpa" { type master; file "master/empty.db"; };
-zone "223.in-addr.arpa" { type master; file "master/empty.db"; };
-
-// Public Data Networks (RFC 3330)
-zone "14.in-addr.arpa" { type master; file "master/empty.db"; };
-
// Private Use Networks (RFC 1918)
zone "10.in-addr.arpa" { type master; file "master/empty.db"; };
zone "16.172.in-addr.arpa" { type master; file "master/empty.db"; };
==== //depot/projects/dtrace/src/lib/libkvm/kvm.c#7 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libkvm/kvm.c,v 1.31 2007/06/15 11:35:11 simokawa Exp $");
+__FBSDID("$FreeBSD: src/lib/libkvm/kvm.c,v 1.32 2008/01/12 00:54:47 delphij Exp $");
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
@@ -290,6 +290,10 @@
_kvm_freevtop(kd);
if (kd->procbase != 0)
free((void *)kd->procbase);
+ if (kd->argbuf != 0)
+ free((void *) kd->argbuf);
+ if (kd->argspc != 0)
+ free((void *) kd->argspc);
if (kd->argv != 0)
free((void *)kd->argv);
free((void *)kd);
==== //depot/projects/dtrace/src/lib/msun/src/s_csqrt.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/s_csqrt.c,v 1.1 2007/12/15 08:38:43 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/s_csqrt.c,v 1.2 2008/01/11 04:18:25 das Exp $");
#include <complex.h>
#include <math.h>
@@ -41,17 +41,20 @@
*/
#pragma STDC CX_LIMITED_RANGE on
-/* We risk spurious overflow for components >= DBL_MAX/(1+sqrt(2)) */
-#define THRESH 0x1.a827999fcef32p+1022
+/* We risk spurious overflow for components >= DBL_MAX / (1 + sqrt(2)). */
+#define THRESH 0x1.a827999fcef32p+1022
double complex
csqrt(double complex z)
{
- double a = creal(z), b = cimag(z);
+ double complex result;
+ double a, b;
double t;
- double complex result;
int scale;
+ a = creal(z);
+ b = cimag(z);
+
/* Handle special cases. */
if (z == 0)
return (cpack(0, b));
@@ -59,13 +62,13 @@
return (cpack(INFINITY, b));
if (isnan(a)) {
t = (b - b) / (b - b); /* raise invalid if b is not a NaN */
- return (cpack(t, t)); /* return NaN + NaN i */
+ return (cpack(a, t)); /* return NaN + NaN i */
}
if (isinf(a)) {
/*
- * csqrt(inf + nan i) = inf + nan i
+ * csqrt(inf + NaN i) = inf + NaN i
* csqrt(inf + y i) = inf + 0 i
- * csqrt(-inf + nan i) = nan +- inf i
+ * csqrt(-inf + NaN i) = NaN +- inf i
* csqrt(-inf + y i) = 0 + inf i
*/
if (signbit(a))
@@ -79,15 +82,15 @@
*/
/* Scale to avoid overflow. */
- if (a >= THRESH || b >= THRESH) {
- a *= 0.25;
- b *= 0.25;
- scale = 1;
+ if (fabs(a) >= THRESH || fabs(b) >= THRESH) {
+ a *= 0.25;
+ b *= 0.25;
+ scale = 1;
} else {
- scale = 0;
+ scale = 0;
}
- /* Algorithm 312, CACM vol 10, Oct 1967 */
+ /* Algorithm 312, CACM vol 10, Oct 1967. */
if (a >= 0) {
t = sqrt((a + hypot(a, b)) * 0.5);
result = cpack(t, b / (2 * t));
@@ -96,9 +99,9 @@
result = cpack(fabs(b) / (2 * t), copysign(t, b));
}
- /* Rescale */
+ /* Rescale. */
if (scale)
- return (result * 2);
+ return (result * 2);
else
- return (result);
+ return (result);
}
==== //depot/projects/dtrace/src/lib/msun/src/s_csqrtf.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/s_csqrtf.c,v 1.1 2007/12/15 08:38:43 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/s_csqrtf.c,v 1.2 2008/01/11 04:18:25 das Exp $");
#include <complex.h>
#include <math.h>
@@ -54,13 +54,13 @@
return (cpackf(INFINITY, b));
if (isnan(a)) {
t = (b - b) / (b - b); /* raise invalid if b is not a NaN */
- return (cpackf(t, t)); /* return NaN + NaN i */
+ return (cpackf(a, t)); /* return NaN + NaN i */
}
if (isinf(a)) {
/*
- * csqrtf(inf + nan i) = inf + nan i
+ * csqrtf(inf + NaN i) = inf + NaN i
* csqrtf(inf + y i) = inf + 0 i
- * csqrtf(-inf + nan i) = nan +- inf i
+ * csqrtf(-inf + NaN i) = NaN +- inf i
* csqrtf(-inf + y i) = 0 + inf i
*/
if (signbit(a))
==== //depot/projects/dtrace/src/sys/amd64/include/ieeefp.h#5 (text+ko) ====
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#) ieeefp.h 1.0 (Berkeley) 9/23/93
- * $FreeBSD: src/sys/amd64/include/ieeefp.h,v 1.17 2008/01/09 15:03:03 bde Exp $
+ * $FreeBSD: src/sys/amd64/include/ieeefp.h,v 1.19 2008/01/11 17:11:32 bde Exp $
*/
#ifndef _MACHINE_IEEEFP_H_
@@ -40,6 +40,7 @@
/*
* IEEE floating point type, constant and function definitions.
+ * XXX: {FP,SSE}*FLD and {FP,SSE}*OFF are undocumented pollution.
*/
#ifndef _SYS_CDEFS_H_
@@ -47,17 +48,17 @@
#endif
/*
- * FP rounding modes
+ * Rounding modes.
*/
typedef enum {
FP_RN=0, /* round to nearest */
- FP_RM, /* round down to minus infinity */
- FP_RP, /* round up to plus infinity */
+ FP_RM, /* round down towards minus infinity */
+ FP_RP, /* round up towards plus infinity */
FP_RZ /* truncate */
} fp_rnd_t;
/*
- * FP precision modes
+ * Precision (i.e., rounding precision) modes.
*/
typedef enum {
FP_PS=0, /* 24 bit (single-precision) */
@@ -69,7 +70,7 @@
#define fp_except_t int
/*
- * FP exception masks
+ * Exception bit masks.
*/
#define FP_X_INV 0x01 /* invalid operation */
#define FP_X_DNML 0x02 /* denormal */
@@ -80,23 +81,19 @@
#define FP_X_STK 0x40 /* stack fault */
/*
- * FP registers
+ * FPU control word bit-field masks.
*/
-#define FP_MSKS_REG 0 /* exception masks */
-#define FP_PRC_REG 0 /* precision */
-#define FP_RND_REG 0 /* direction */
-#define FP_STKY_REG 1 /* sticky flags */
+#define FP_MSKS_FLD 0x3f /* exception masks field */
+#define FP_PRC_FLD 0x300 /* precision control field */
+#define FP_RND_FLD 0xc00 /* rounding control field */
/*
- * FP register bit field masks
+ * FPU status word bit-field masks.
*/
-#define FP_MSKS_FLD 0x3f /* exception masks field */
-#define FP_PRC_FLD 0x300 /* precision control field */
-#define FP_RND_FLD 0xc00 /* round control field */
#define FP_STKY_FLD 0x3f /* sticky flags field */
/*
- * SSE mxcsr register bit field masks
+ * SSE mxcsr register bit-field masks.
*/
#define SSE_STKY_FLD 0x3f /* exception flags */
#define SSE_DAZ_FLD 0x40 /* Denormals are zero */
@@ -105,15 +102,19 @@
#define SSE_FZ_FLD 0x8000 /* flush to zero on underflow */
/*
- * FP register bit field offsets
+ * FPU control word bit-field offsets (shift counts).
*/
#define FP_MSKS_OFF 0 /* exception masks offset */
#define FP_PRC_OFF 8 /* precision control offset */
-#define FP_RND_OFF 10 /* round control offset */
+#define FP_RND_OFF 10 /* rounding control offset */
+
+/*
+ * FPU status word bit-field offsets (shift counts).
+ */
#define FP_STKY_OFF 0 /* sticky flags offset */
/*
- * SSE mxcsr register bit field offsets
+ * SSE mxcsr register bit-field offsets (shift counts).
*/
#define SSE_STKY_OFF 0 /* exception flags offset */
#define SSE_DAZ_OFF 6 /* DAZ exception mask offset */
@@ -124,12 +125,42 @@
#ifdef __GNUCLIKE_ASM
#define __fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr)))
+#define __fldenv(addr) __asm __volatile("fldenv %0" : : "m" (*(addr)))
#define __fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr)))
+#define __fnstenv(addr) __asm __volatile("fnstenv %0" : "=m" (*(addr)))
#define __fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
#define __ldmxcsr(addr) __asm __volatile("ldmxcsr %0" : : "m" (*(addr)))
#define __stmxcsr(addr) __asm __volatile("stmxcsr %0" : "=m" (*(addr)))
/*
+ * Load the control word. Be careful not to trap if there is a currently
+ * unmasked exception (ones that will become freshly unmasked are not a
+ * problem). This case must be handled by a save/restore of the
+ * environment or even of the full x87 state. Accessing the environment
+ * is very inefficient, so only do it when necessary.
+ */
+static __inline void
+__fnldcw(unsigned short _cw, unsigned short _newcw)
+{
+ struct {
+ unsigned _cw;
+ unsigned _other[6];
+ } _env;
+ unsigned short _sw;
+
+ if ((_cw & FP_MSKS_FLD) != FP_MSKS_FLD) {
+ __fnstsw(&_sw);
+ if (((_sw & ~_cw) & FP_STKY_FLD) != 0) {
+ __fnstenv(&_env);
+ _env._cw = _newcw;
+ __fldenv(&_env);
+ return;
+ }
+ }
+ __fldcw(&_newcw);
+}
+
+/*
* General notes about conflicting SSE vs FP status bits.
* This code assumes that software will not fiddle with the control
* bits of the SSE and x87 in such a way to get them out of sync and
@@ -154,13 +185,13 @@
{
fp_rnd_t _p;
unsigned _mxcsr;
- unsigned short _cw;
+ unsigned short _cw, _newcw;
__fnstcw(&_cw);
_p = (fp_rnd_t)((_cw & FP_RND_FLD) >> FP_RND_OFF);
- _cw &= ~FP_RND_FLD;
- _cw |= (_m << FP_RND_OFF) & FP_RND_FLD;
- __fldcw(&_cw);
+ _newcw = _cw & ~FP_RND_FLD;
+ _newcw |= (_m << FP_RND_OFF) & FP_RND_FLD;
+ __fnldcw(_cw, _newcw);
__stmxcsr(&_mxcsr);
_mxcsr &= ~SSE_RND_FLD;
_mxcsr |= (_m << SSE_RND_OFF) & SSE_RND_FLD;
@@ -186,13 +217,13 @@
__fpsetprec(fp_prec_t _m)
{
fp_prec_t _p;
- unsigned short _cw;
+ unsigned short _cw, _newcw;
__fnstcw(&_cw);
_p = (fp_prec_t)((_cw & FP_PRC_FLD) >> FP_PRC_OFF);
- _cw &= ~FP_PRC_FLD;
- _cw |= (_m << FP_PRC_OFF) & FP_PRC_FLD;
- __fldcw(&_cw);
+ _newcw = _cw & ~FP_PRC_FLD;
+ _newcw |= (_m << FP_PRC_OFF) & FP_PRC_FLD;
+ __fnldcw(_cw, _newcw);
return (_p);
}
@@ -216,13 +247,13 @@
{
fp_except_t _p;
unsigned _mxcsr;
- unsigned short _cw;
+ unsigned short _cw, _newcw;
__fnstcw(&_cw);
_p = (~_cw & FP_MSKS_FLD) >> FP_MSKS_OFF;
- _cw &= ~FP_MSKS_FLD;
- _cw |= (~_m >> FP_MSKS_OFF) & FP_MSKS_FLD;
- __fldcw(&_cw);
+ _newcw = _cw & ~FP_MSKS_FLD;
+ _newcw |= (~_m << FP_MSKS_OFF) & FP_MSKS_FLD;
+ __fnldcw(_cw, _newcw);
__stmxcsr(&_mxcsr);
/* XXX should we clear non-ieee SSE_DAZ_FLD and SSE_FZ_FLD ? */
_mxcsr &= ~SSE_MSKS_FLD;
@@ -248,13 +279,13 @@
#if !defined(__IEEEFP_NOINLINES__) && defined(__GNUCLIKE_ASM)
+#define fpgetmask() __fpgetmask()
+#define fpgetprec() __fpgetprec()
#define fpgetround() __fpgetround()
-#define fpsetround(_m) __fpsetround(_m)
-#define fpgetprec() __fpgetprec()
-#define fpsetprec(_m) __fpsetprec(_m)
-#define fpgetmask() __fpgetmask()
-#define fpsetmask(_m) __fpsetmask(_m)
#define fpgetsticky() __fpgetsticky()
+#define fpsetmask(m) __fpsetmask(m)
+#define fpsetprec(m) __fpsetprec(m)
+#define fpsetround(m) __fpsetround(m)
/* Suppress prototypes in the MI header. */
#define _IEEEFP_INLINED_ 1
==== //depot/projects/dtrace/src/sys/dev/fdc/fdc.c#10 (text+ko) ====
@@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.318 2007/10/20 23:23:14 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.320 2008/01/11 16:50:52 kib Exp $");
#include "opt_fdc.h"
@@ -1383,6 +1383,7 @@
struct fd_data *fd;
struct fdc_data *fdc;
int ar, aw, ae;
+ int busy;
fd = pp->geom->softc;
fdc = fd->fdc;
@@ -1403,6 +1404,7 @@
return (0);
}
+ busy = 0;
if (pp->acr == 0 && pp->acw == 0 && pp->ace == 0) {
if (fdmisccmd(fd, BIO_PROBE, NULL))
return (ENXIO);
@@ -1415,10 +1417,14 @@
mtx_unlock(&fdc->fdc_mtx);
}
device_busy(fd->dev);
+ busy = 1;
}
- if (w > 0 && (fd->flags & FD_WP))
+ if (w > 0 && (fd->flags & FD_WP)) {
+ if (busy)
+ device_unbusy(fd->dev);
return (EROFS);
+ }
pp->sectorsize = fd->sectorsize;
pp->stripesize = fd->ft->heads * fd->ft->sectrac * fd->sectorsize;
@@ -1714,7 +1720,7 @@
fdc->flags |= FDC_KTHREAD_EXIT;
wakeup(&fdc->head);
while ((fdc->flags & FDC_KTHREAD_ALIVE) != 0)
- msleep(&fdc->fdc_thread, &fdc->fdc_mtx, PRIBIO, "fdcdet", 0);
+ msleep(fdc->fdc_thread, &fdc->fdc_mtx, PRIBIO, "fdcdet", 0);
mtx_unlock(&fdc->fdc_mtx);
/* reset controller, turn motor off */
==== //depot/projects/dtrace/src/sys/i386/include/ieeefp.h#4 (text+ko) ====
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2003 Peter Wemm.
* Copyright (c) 1990 Andrew Moore, Talke Studio
* All rights reserved.
*
@@ -31,32 +32,33 @@
* SUCH DAMAGE.
*
* from: @(#) ieeefp.h 1.0 (Berkeley) 9/23/93
- * $FreeBSD: src/sys/i386/include/ieeefp.h,v 1.11 2005/03/15 15:53:39 das Exp $
+ * $FreeBSD: src/sys/i386/include/ieeefp.h,v 1.14 2008/01/11 18:59:35 bde Exp $
*/
+#ifndef _MACHINE_IEEEFP_H_
+#define _MACHINE_IEEEFP_H_
+
/*
- * IEEE floating point type and constant definitions.
+ * IEEE floating point type, constant and function definitions.
+ * XXX: FP*FLD and FP*OFF are undocumented pollution.
*/
-#ifndef _MACHINE_IEEEFP_H_
-#define _MACHINE_IEEEFP_H_
-
#ifndef _SYS_CDEFS_H_
#error this file needs sys/cdefs.h as a prerequisite
#endif
/*
- * FP rounding modes
+ * Rounding modes.
*/
typedef enum {
FP_RN=0, /* round to nearest */
- FP_RM, /* round down to minus infinity */
- FP_RP, /* round up to plus infinity */
+ FP_RM, /* round down towards minus infinity */
+ FP_RP, /* round up towards plus infinity */
FP_RZ /* truncate */
} fp_rnd_t;
/*
- * FP precision modes
+ * Precision (i.e., rounding precision) modes.
*/
typedef enum {
FP_PS=0, /* 24 bit (single-precision) */
@@ -68,7 +70,7 @@
#define fp_except_t int
/*
- * FP exception masks
+ * Exception bit masks.
*/
#define FP_X_INV 0x01 /* invalid operation */
#define FP_X_DNML 0x02 /* denormal */
@@ -79,105 +81,178 @@
#define FP_X_STK 0x40 /* stack fault */
/*
- * FP registers
+ * FPU control word bit-field masks.
*/
-#define FP_MSKS_REG 0 /* exception masks */
-#define FP_PRC_REG 0 /* precision */
-#define FP_RND_REG 0 /* direction */
-#define FP_STKY_REG 1 /* sticky flags */
+#define FP_MSKS_FLD 0x3f /* exception masks field */
+#define FP_PRC_FLD 0x300 /* precision control field */
+#define FP_RND_FLD 0xc00 /* rounding control field */
/*
- * FP register bit field masks
+ * FPU status word bit-field masks.
*/
-#define FP_MSKS_FLD 0x3f /* exception masks field */
-#define FP_PRC_FLD 0x300 /* precision control field */
-#define FP_RND_FLD 0xc00 /* round control field */
#define FP_STKY_FLD 0x3f /* sticky flags field */
/*
- * FP register bit field offsets
+ * FPU control word bit-field offsets (shift counts).
*/
#define FP_MSKS_OFF 0 /* exception masks offset */
#define FP_PRC_OFF 8 /* precision control offset */
-#define FP_RND_OFF 10 /* round control offset */
+#define FP_RND_OFF 10 /* rounding control offset */
+
+/*
+ * FPU status word bit-field offsets (shift counts).
+ */
#define FP_STKY_OFF 0 /* sticky flags offset */
#ifdef __GNUCLIKE_ASM
+#define __fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr)))
#define __fldenv(addr) __asm __volatile("fldenv %0" : : "m" (*(addr)))
+#define __fnclex() __asm __volatile("fnclex")
+#define __fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr)))
#define __fnstenv(addr) __asm __volatile("fnstenv %0" : "=m" (*(addr)))
-#define __fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr)))
#define __fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
/*
- * return the contents of a FP register
+ * Load the control word. Be careful not to trap if there is a currently
+ * unmasked exception (ones that will become freshly unmasked are not a
+ * problem). This case must be handled by a save/restore of the
+ * environment or even of the full x87 state. Accessing the environment
+ * is very inefficient, so only do it when necessary.
*/
-static __inline__ int
-__fpgetreg(int _reg)
+static __inline void
+__fnldcw(unsigned short _cw, unsigned short _newcw)
{
- unsigned short _mem;
+ struct {
+ unsigned _cw;
+ unsigned _other[6];
+ } _env;
+ unsigned short _sw;
- /*-
- * This is more efficient than it looks. The switch gets optimized
- * away if _reg is constant.
- *
- * The default case only supports _reg == 0. We could handle more
- * registers (e.g., tags) using fnstenv, but the interface doesn't
- * support more.
- */
- switch(_reg) {
- default:
- __fnstcw(&_mem);
- break;
- case FP_STKY_REG:
- __fnstsw(&_mem);
- break;
+ if ((_cw & FP_MSKS_FLD) != FP_MSKS_FLD) {
+ __fnstsw(&_sw);
+ if (((_sw & ~_cw) & FP_STKY_FLD) != 0) {
+ __fnstenv(&_env);
+ _env._cw = _newcw;
+ __fldenv(&_env);
+ return;
+ }
}
- return _mem;
+ __fldcw(&_newcw);
+}
+
+static __inline fp_rnd_t
+fpgetround(void)
+{
+ unsigned short _cw;
+
+ __fnstcw(&_cw);
+ return ((fp_rnd_t)((_cw & FP_RND_FLD) >> FP_RND_OFF));
+}
+
+static __inline fp_rnd_t
+fpsetround(fp_rnd_t _m)
+{
+ fp_rnd_t _p;
+ unsigned short _cw, _newcw;
+
+ __fnstcw(&_cw);
+ _p = (fp_rnd_t)((_cw & FP_RND_FLD) >> FP_RND_OFF);
+ _newcw = _cw & ~FP_RND_FLD;
+ _newcw |= (_m << FP_RND_OFF) & FP_RND_FLD;
+ __fnldcw(_cw, _newcw);
+ return (_p);
+}
+
+static __inline fp_prec_t
+fpgetprec(void)
+{
+ unsigned short _cw;
+
+ __fnstcw(&_cw);
+ return ((fp_prec_t)((_cw & FP_PRC_FLD) >> FP_PRC_OFF));
+}
+
+static __inline fp_prec_t
+fpsetprec(fp_prec_t _m)
+{
+ fp_prec_t _p;
+ unsigned short _cw, _newcw;
+
+ __fnstcw(&_cw);
+ _p = (fp_prec_t)((_cw & FP_PRC_FLD) >> FP_PRC_OFF);
+ _newcw = _cw & ~FP_PRC_FLD;
+ _newcw |= (_m << FP_PRC_OFF) & FP_PRC_FLD;
+ __fnldcw(_cw, _newcw);
+ return (_p);
}
/*
- * set a FP mode; return previous mode
+ * Get or set the exception mask.
+ * Note that the x87 mask bits are inverted by the API -- a mask bit of 1
+ * means disable for x87 and SSE, but for fp*mask() it means enable.
*/
-static __inline__ int
-__fpsetreg(int _m, int _reg, int _fld, int _off)
+
+static __inline fp_except_t
+fpgetmask(void)
+{
+ unsigned short _cw;
+
+ __fnstcw(&_cw);
+ return ((~_cw & FP_MSKS_FLD) >> FP_MSKS_OFF);
+}
+
+static __inline fp_except_t
+fpsetmask(fp_except_t _m)
+{
+ fp_except_t _p;
+ unsigned short _cw, _newcw;
+
+ __fnstcw(&_cw);
+ _p = (~_cw & FP_MSKS_FLD) >> FP_MSKS_OFF;
+ _newcw = _cw & ~FP_MSKS_FLD;
+ _newcw |= (~_m << FP_MSKS_OFF) & FP_MSKS_FLD;
+ __fnldcw(_cw, _newcw);
+ return (_p);
+}
+
+static __inline fp_except_t
+fpgetsticky(void)
+{
+ unsigned _ex;
+ unsigned short _sw;
+
+ __fnstsw(&_sw);
+ _ex = (_sw & FP_STKY_FLD) >> FP_STKY_OFF;
+ return ((fp_except_t)_ex);
+}
+
+static __inline fp_except_t
+fpresetsticky(fp_except_t _m)
{
- unsigned _env[7];
- unsigned _p;
+ struct {
+ unsigned _cw;
+ unsigned _sw;
+ unsigned _other[5];
+ } _env;
+ fp_except_t _p;
- /*
- * _reg == 0 could be handled better using fnstcw/fldcw.
- */
- __fnstenv(_env);
- _p = (_env[_reg] & _fld) >> _off;
- _env[_reg] = (_env[_reg] & ~_fld) | (_m << _off & _fld);
- __fldenv(_env);
- return _p;
+ _m &= FP_STKY_FLD >> FP_STKY_OFF;
+ _p = fpgetsticky();
+ if ((_p & ~_m) == _p)
+ return (_p);
+ if ((_p & ~_m) == 0) {
+ __fnclex();
+ return (_p);
+ }
+ __fnstenv(&_env);
+ _env._sw &= ~_m;
+ __fldenv(&_env);
+ return (_p);
}
#endif /* __GNUCLIKE_ASM */
-/*
- * SysV/386 FP control interface
- */
-#define fpgetround() ((fp_rnd_t) \
- ((__fpgetreg(FP_RND_REG) & FP_RND_FLD) >> FP_RND_OFF))
-#define fpsetround(m) ((fp_rnd_t) \
- __fpsetreg((m), FP_RND_REG, FP_RND_FLD, FP_RND_OFF))
-#define fpgetprec() ((fp_prec_t) \
- ((__fpgetreg(FP_PRC_REG) & FP_PRC_FLD) >> FP_PRC_OFF))
-#define fpsetprec(m) ((fp_prec_t) \
- __fpsetreg((m), FP_PRC_REG, FP_PRC_FLD, FP_PRC_OFF))
-#define fpgetmask() ((fp_except_t) \
- ((~__fpgetreg(FP_MSKS_REG) & FP_MSKS_FLD) >> FP_MSKS_OFF))
-#define fpsetmask(m) ((fp_except_t) \
- (~__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)) & \
- (FP_MSKS_FLD >> FP_MSKS_OFF))
-#define fpgetsticky() ((fp_except_t) \
- ((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF))
-#define fpresetsticky(m) ((fp_except_t) \
- __fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF))
-
/* Suppress prototypes in the MI header. */
#define _IEEEFP_INLINED_ 1
==== //depot/projects/dtrace/src/sys/kern/kern_lock.c#15 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_lock.c,v 1.118 2008/01/09 00:02:43 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_lock.c,v 1.119 2008/01/11 16:38:12 attilio Exp $");
#include "opt_ddb.h"
#include "opt_global.h"
@@ -546,16 +546,19 @@
struct thread *td;
td = curthread;
- KASSERT(lkp->lk_exclusivecount,
+ KASSERT(panicstr != NULL || lkp->lk_exclusivecount,
("%s: %p lockmgr must be exclusively locked", __func__, lkp));
- KASSERT(lkp->lk_lockholder == td || lkp->lk_lockholder == LK_KERNPROC,
+ KASSERT(panicstr != NULL || lkp->lk_lockholder == td ||
+ lkp->lk_lockholder == LK_KERNPROC,
("%s: %p lockmgr must be locked by curthread (%p)", __func__, lkp,
td));
/*
* Drop the lock reference and switch the owner. This will result
* in an atomic operation like td_lock is only accessed by curthread
- * and lk_lockholder only needs one write.
+ * and lk_lockholder only needs one write. Note also that the lock
+ * owner can be alredy KERNPROC, so in that case just skip the
+ * decrement.
*/
if (lkp->lk_lockholder == td)
td->td_locks--;
==== //depot/projects/dtrace/src/sys/nfsclient/nfs_socket.c#15 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.156 2008/01/10 23:36:00 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.157 2008/01/11 23:57:39 jhb Exp $");
/*
* Socket operations for use by nfs
@@ -264,7 +264,22 @@
int error, rcvreserve, sndreserve;
int pktscale;
struct sockaddr *saddr;
- struct thread *td = curthread; /* only used for socreate and sobind */
+ struct ucred *origcred;
+ struct thread *td = curthread;
+
+ /*
+ * We need to establish the socket using the credentials of
+ * the mountpoint. Some parts of this process (such as
+ * sobind() and soconnect()) will use the curent thread's
+ * credential instead of the socket credential. To work
+ * around this, temporarily change the current thread's
+ * credential to that of the mountpoint.
+ *
+ * XXX: It would be better to explicitly pass the correct
+ * credential to sobind() and soconnect().
+ */
+ origcred = td->td_ucred;
+ td->td_ucred = nmp->nm_mountp->mnt_cred;
if (nmp->nm_sotype == SOCK_STREAM) {
mtx_lock(&nmp->nm_mtx);
@@ -453,6 +468,9 @@
so->so_snd.sb_flags |= SB_NOINTR;
SOCKBUF_UNLOCK(&so->so_snd);
+ /* Restore current thread's credentials. */
+ td->td_ucred = origcred;
+
mtx_lock(&nmp->nm_mtx);
/* Initialize other non-zero congestion variables */
nfs_init_rtt(nmp);
@@ -463,6 +481,9 @@
return (0);
bad:
+ /* Restore current thread's credentials. */
+ td->td_ucred = origcred;
+
nfs_disconnect(nmp);
return (error);
}
==== //depot/projects/dtrace/src/usr.bin/systat/ifstat.c#6 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/usr.bin/systat/ifstat.c,v 1.6 2006/11/27 16:59:08 yar Exp $
+ * $FreeBSD: src/usr.bin/systat/ifstat.c,v 1.7 2008/01/12 00:11:26 delphij Exp $
*/
#include <sys/types.h>
@@ -37,6 +37,7 @@
#include <stdlib.h>
#include <string.h>
#include <err.h>
+#include <errno.h>
#include "systat.h"
#include "extern.h"
@@ -210,10 +211,9 @@
SLIST_INIT(&curlist);
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list