PERFORCE change 136195 for review
Peter Wemm
peter at FreeBSD.org
Tue Feb 26 00:14:33 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=136195
Change 136195 by peter at peter_overcee on 2008/02/26 00:14:13
IFC @136192
Affected files ...
.. //depot/projects/hammer/bin/sh/cd.c#5 integrate
.. //depot/projects/hammer/contrib/tcpdump/print-802_11.c#9 integrate
.. //depot/projects/hammer/gnu/lib/libgcc/Makefile#17 integrate
.. //depot/projects/hammer/gnu/usr.bin/binutils/ar/Makefile#6 integrate
.. //depot/projects/hammer/gnu/usr.bin/binutils/ranlib/Makefile#7 integrate
.. //depot/projects/hammer/gnu/usr.bin/gdb/kgdb/kgdb.h#8 integrate
.. //depot/projects/hammer/lib/libc/powerpc/gen/flt_rounds.c#2 integrate
.. //depot/projects/hammer/lib/libc/powerpc/gen/fpgetmask.c#2 integrate
.. //depot/projects/hammer/lib/libc/powerpc/gen/fpgetround.c#2 integrate
.. //depot/projects/hammer/lib/libc/powerpc/gen/fpgetsticky.c#2 integrate
.. //depot/projects/hammer/lib/libc/powerpc/gen/fpsetmask.c#2 integrate
.. //depot/projects/hammer/lib/libc/powerpc/gen/fpsetround.c#2 integrate
.. //depot/projects/hammer/lib/libc/sys/clock_gettime.2#10 integrate
.. //depot/projects/hammer/lib/msun/powerpc/fenv.h#4 integrate
.. //depot/projects/hammer/lib/msun/src/e_rem_pio2.c#4 integrate
.. //depot/projects/hammer/lib/msun/src/e_rem_pio2f.c#8 integrate
.. //depot/projects/hammer/lib/msun/src/k_rem_pio2.c#4 integrate
.. //depot/projects/hammer/lib/msun/src/math_private.h#10 integrate
.. //depot/projects/hammer/lib/msun/src/s_cosf.c#6 integrate
.. //depot/projects/hammer/lib/msun/src/s_sinf.c#5 integrate
.. //depot/projects/hammer/lib/msun/src/s_tanf.c#5 integrate
.. //depot/projects/hammer/sbin/ping6/ping6.c#12 integrate
.. //depot/projects/hammer/share/man/man9/VOP_LOCK.9#10 integrate
.. //depot/projects/hammer/share/man/man9/lock.9#12 integrate
.. //depot/projects/hammer/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#8 integrate
.. //depot/projects/hammer/sys/dev/atkbdc/psm.c#9 integrate
.. //depot/projects/hammer/sys/dev/cxgb/cxgb_sge.c#17 integrate
.. //depot/projects/hammer/sys/fs/devfs/devfs_vnops.c#57 integrate
.. //depot/projects/hammer/sys/fs/nullfs/null_vfsops.c#29 integrate
.. //depot/projects/hammer/sys/fs/nullfs/null_vnops.c#31 integrate
.. //depot/projects/hammer/sys/fs/smbfs/smbfs_io.c#21 integrate
.. //depot/projects/hammer/sys/fs/tmpfs/tmpfs_subr.c#9 integrate
.. //depot/projects/hammer/sys/fs/tmpfs/tmpfs_vnops.c#10 integrate
.. //depot/projects/hammer/sys/fs/unionfs/union_vfsops.c#25 integrate
.. //depot/projects/hammer/sys/fs/unionfs/union_vnops.c#36 integrate
.. //depot/projects/hammer/sys/i386/i386/identcpu.c#41 integrate
.. //depot/projects/hammer/sys/i386/i386/initcpu.c#19 integrate
.. //depot/projects/hammer/sys/kern/kern_lock.c#37 integrate
.. //depot/projects/hammer/sys/kern/vfs_cache.c#27 integrate
.. //depot/projects/hammer/sys/kern/vfs_default.c#53 integrate
.. //depot/projects/hammer/sys/kern/vfs_lookup.c#33 integrate
.. //depot/projects/hammer/sys/kern/vfs_subr.c#124 integrate
.. //depot/projects/hammer/sys/kern/vnode_if.src#25 integrate
.. //depot/projects/hammer/sys/netgraph/ng_base.c#54 integrate
.. //depot/projects/hammer/sys/netncp/ncp_conn.c#12 integrate
.. //depot/projects/hammer/sys/netsmb/smb_conn.c#13 integrate
.. //depot/projects/hammer/sys/netsmb/smb_iod.c#11 integrate
.. //depot/projects/hammer/sys/nfs4client/nfs4_vfsops.c#25 integrate
.. //depot/projects/hammer/sys/nfsclient/nfs_subs.c#33 integrate
.. //depot/projects/hammer/sys/nfsclient/nfs_vfsops.c#53 integrate
.. //depot/projects/hammer/sys/powerpc/include/float.h#9 integrate
.. //depot/projects/hammer/sys/powerpc/include/hid.h#4 integrate
.. //depot/projects/hammer/sys/powerpc/include/spr.h#6 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/cpu.c#8 integrate
.. //depot/projects/hammer/sys/security/audit/audit.c#14 integrate
.. //depot/projects/hammer/sys/security/audit/audit_arg.c#12 integrate
.. //depot/projects/hammer/sys/security/audit/audit_bsm.c#12 integrate
.. //depot/projects/hammer/sys/security/audit/audit_bsm_klib.c#9 integrate
.. //depot/projects/hammer/sys/security/audit/audit_private.h#7 integrate
.. //depot/projects/hammer/sys/sys/buf.h#34 integrate
.. //depot/projects/hammer/sys/sys/lockmgr.h#17 integrate
.. //depot/projects/hammer/sys/sys/param.h#105 integrate
.. //depot/projects/hammer/sys/ufs/ffs/ffs_rawread.c#22 integrate
.. //depot/projects/hammer/sys/ufs/ffs/ffs_vnops.c#49 integrate
.. //depot/projects/hammer/sys/vm/vm_object.c#74 integrate
.. //depot/projects/hammer/tools/regression/bin/sh/builtins/cd1.0#1 branch
.. //depot/projects/hammer/usr.bin/ar/Makefile#4 integrate
.. //depot/projects/hammer/usr.bin/ar/ar.c#4 integrate
.. //depot/projects/hammer/usr.bin/ar/write.c#2 integrate
.. //depot/projects/hammer/usr.bin/du/du.1#9 integrate
.. //depot/projects/hammer/usr.bin/du/du.c#17 integrate
.. //depot/projects/hammer/usr.bin/find/find.1#24 integrate
Differences ...
==== //depot/projects/hammer/bin/sh/cd.c#5 (text+ko) ====
@@ -36,7 +36,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/cd.c,v 1.35 2006/06/12 21:06:00 stefanf Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/cd.c,v 1.36 2008/02/24 16:50:55 stefanf Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -68,7 +68,9 @@
STATIC int cdphysical(char *);
STATIC int docd(char *, int, int);
STATIC char *getcomponent(void);
-STATIC int updatepwd(char *);
+STATIC char *findcwd(char *);
+STATIC void updatepwd(char *);
+STATIC char *getpwd2(char *, size_t);
STATIC char *curdir = NULL; /* current working directory */
STATIC char *prevdir; /* previous working directory */
@@ -201,10 +203,11 @@
}
INTOFF;
- if (updatepwd(badstat ? NULL : dest) < 0 || chdir(curdir) < 0) {
+ if ((p = findcwd(badstat ? NULL : dest)) == NULL || chdir(p) < 0) {
INTON;
return (-1);
}
+ updatepwd(p);
INTON;
return (0);
}
@@ -212,12 +215,14 @@
STATIC int
cdphysical(char *dest)
{
+ char *p;
INTOFF;
- if (chdir(dest) < 0 || updatepwd(NULL) < 0) {
+ if (chdir(dest) < 0 || (p = findcwd(NULL)) == NULL) {
INTON;
return (-1);
}
+ updatepwd(p);
INTON;
return (0);
}
@@ -247,38 +252,20 @@
}
-/*
- * Update curdir (the name of the current directory) in response to a
- * cd command. We also call hashcd to let the routines in exec.c know
- * that the current directory has changed.
- */
-STATIC int
-updatepwd(char *dir)
+STATIC char *
+findcwd(char *dir)
{
char *new;
char *p;
- hashcd(); /* update command hash table */
-
/*
* If our argument is NULL, we don't know the current directory
* any more because we traversed a symbolic link or something
* we couldn't stat().
*/
if (dir == NULL || curdir == NULL) {
- if (prevdir)
- ckfree(prevdir);
- INTOFF;
- prevdir = curdir;
- curdir = NULL;
- if (getpwd() == NULL) {
- INTON;
- return (-1);
- }
- setvar("PWD", curdir, VEXPORT);
- setvar("OLDPWD", prevdir, VEXPORT);
- INTON;
- return (0);
+ p = stalloc(PATH_MAX);
+ return getpwd2(p, PATH_MAX);
}
cdcomppath = stalloc(strlen(dir) + 1);
scopy(dir, cdcomppath);
@@ -302,16 +289,25 @@
if (new == stackblock())
STPUTC('/', new);
STACKSTRNUL(new);
- INTOFF;
+ return stackblock();
+}
+
+/*
+ * Update curdir (the name of the current directory) in response to a
+ * cd command. We also call hashcd to let the routines in exec.c know
+ * that the current directory has changed.
+ */
+STATIC void
+updatepwd(char *dir)
+{
+ hashcd(); /* update command hash table */
+
if (prevdir)
ckfree(prevdir);
prevdir = curdir;
- curdir = savestr(stackblock());
+ curdir = savestr(dir);
setvar("PWD", curdir, VEXPORT);
setvar("OLDPWD", prevdir, VEXPORT);
- INTON;
-
- return (0);
}
int
@@ -355,17 +351,31 @@
}
/*
- * Find out what the current directory is. If we already know the current
- * directory, this routine returns immediately.
+ * Get the current directory and cache the result in curdir.
*/
char *
getpwd(void)
{
char buf[PATH_MAX];
+ char *p;
if (curdir)
return curdir;
- if (getcwd(buf, sizeof(buf)) == NULL) {
+
+ p = getpwd2(buf, sizeof(buf));
+ if (p != NULL)
+ curdir = savestr(p);
+
+ return curdir;
+}
+
+/*
+ * Return the current directory.
+ */
+STATIC char *
+getpwd2(char *buf, size_t size)
+{
+ if (getcwd(buf, size) == NULL) {
char *pwd = getenv("PWD");
struct stat stdot, stpwd;
@@ -373,12 +383,9 @@
stat(pwd, &stpwd) != -1 &&
stdot.st_dev == stpwd.st_dev &&
stdot.st_ino == stpwd.st_ino) {
- curdir = savestr(pwd);
- return curdir;
+ return pwd;
}
return NULL;
}
- curdir = savestr(buf);
-
- return curdir;
+ return buf;
}
==== //depot/projects/hammer/contrib/tcpdump/print-802_11.c#9 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/tcpdump/print-802_11.c,v 1.3 2007/10/16 02:31:47 mlaier Exp $ */
+/* $FreeBSD: src/contrib/tcpdump/print-802_11.c,v 1.4 2008/02/25 01:28:14 sam Exp $ */
/*
* Copyright (c) 2001
* Fortress Technologies, Inc. All rights reserved.
@@ -1186,9 +1186,9 @@
break;
case IEEE80211_RADIOTAP_RATE:
if (u.u8 & 0x80)
+ PRINT_HT_RATE("", u.u8, " Mb/s ");
+ else
PRINT_RATE("", u.u8, " Mb/s ");
- else
- PRINT_HT_RATE("", u.u8, " Mb/s ");
break;
case IEEE80211_RADIOTAP_DBM_ANTSIGNAL:
printf("%ddB signal ", u.i8);
==== //depot/projects/hammer/gnu/lib/libgcc/Makefile#17 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.58 2007/08/14 20:49:57 kan Exp $
+# $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.59 2008/02/24 19:22:52 raj Exp $
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
@@ -122,7 +122,7 @@
.if ${TARGET_ARCH} == "powerpc"
# from config/rs6000/t-ppccomm
-LIB2FUNCS_EXTRA = tramp.asm darwin-ldouble.c
+LIB2FUNCS_EXTRA = tramp.asm
LIB2FUNCS_STATIC_EXTRA = eabi.asm
.endif
==== //depot/projects/hammer/gnu/usr.bin/binutils/ar/Makefile#6 (text+ko) ====
@@ -1,15 +1,18 @@
-# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.16 2008/02/21 16:59:02 obrien Exp $
+# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.17 2008/02/25 16:16:16 ru Exp $
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
-.if defined(WITH_BSDAR)
-PROG= gnu-ar
-#MAN= gnu-ar.1
-.else
+.if !defined(_WITH_GNUAR)
+PROGNAME= gnu-ar
+MAN= gnu-ar.1
+gnu-ar.1: ar.1
+ cat ${.ALLSRC} > ${.TARGET}
+CLEANFILES+= gnu-ar.1
+.endif
+
PROG= ar
-.endif
SRCS= ar.c not-ranlib.c
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
==== //depot/projects/hammer/gnu/usr.bin/binutils/ranlib/Makefile#7 (text+ko) ====
@@ -1,15 +1,18 @@
-# $FreeBSD: src/gnu/usr.bin/binutils/ranlib/Makefile,v 1.17 2008/02/21 16:59:02 obrien Exp $
+# $FreeBSD: src/gnu/usr.bin/binutils/ranlib/Makefile,v 1.18 2008/02/25 16:16:16 ru Exp $
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
-.if defined(WITH_BSDAR)
-PROG= gnu-ranlib
-#MAN= gnu-ranlib.1
-.else
+.if !defined(_WITH_GNUAR)
+PROGNAME= gnu-ranlib
+MAN= gnu-ranlib.1
+gnu-ranlib.1: ranlib.1
+ cat ${.ALLSRC} > ${.TARGET}
+CLEANFILES+= gnu-ranlib.1
+.endif
+
PROG= ranlib
-.endif
SRCS= ar.c is-ranlib.c
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
==== //depot/projects/hammer/gnu/usr.bin/gdb/kgdb/kgdb.h#8 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.11 2008/01/29 23:44:34 jhb Exp $
+ * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.12 2008/02/25 22:04:07 jhb Exp $
*/
#ifndef _KGDB_H_
@@ -49,7 +49,6 @@
extern struct kthr *curkthr;
void kgdb_add_kld_cmd(char *, int);
-void kgdb_auto_load_klds(void);
void kgdb_kld_init(void);
void kgdb_target(void);
void kgdb_trgt_fetch_registers(int);
==== //depot/projects/hammer/lib/libc/powerpc/gen/flt_rounds.c#2 (text+ko) ====
@@ -32,11 +32,12 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/flt_rounds.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/flt_rounds.c,v 1.2 2008/02/24 19:22:53 raj Exp $");
#include <sys/types.h>
#include <machine/float.h>
+#ifndef _SOFT_FLOAT
static const int map[] = {
1, /* round to nearest */
0, /* round to zero */
@@ -52,3 +53,4 @@
__asm__ __volatile("mffs %0" : "=f"(fpscr));
return map[(fpscr & 0x03)];
}
+#endif
==== //depot/projects/hammer/lib/libc/powerpc/gen/fpgetmask.c#2 (text+ko) ====
@@ -38,11 +38,12 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpgetmask.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpgetmask.c,v 1.2 2008/02/24 19:22:53 raj Exp $");
#include <sys/types.h>
#include <ieeefp.h>
+#ifndef _SOFT_FLOAT
fp_except_t
fpgetmask()
{
@@ -51,3 +52,4 @@
__asm__("mffs %0" : "=f"(fpscr));
return ((fp_except_t)((fpscr >> 3) & 0x1f));
}
+#endif
==== //depot/projects/hammer/lib/libc/powerpc/gen/fpgetround.c#2 (text+ko) ====
@@ -38,11 +38,12 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpgetround.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpgetround.c,v 1.2 2008/02/24 19:22:53 raj Exp $");
#include <sys/types.h>
#include <ieeefp.h>
+#ifndef _SOFT_FLOAT
fp_rnd_t
fpgetround()
{
@@ -51,3 +52,4 @@
__asm__("mffs %0" : "=f"(fpscr));
return ((fp_rnd_t)(fpscr & 0x3));
}
+#endif
==== //depot/projects/hammer/lib/libc/powerpc/gen/fpgetsticky.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libc/powerpc/gen/fpgetsticky.c,v 1.1 2004/02/12 09:11:06 grehan Exp $
+ * $FreeBSD: src/lib/libc/powerpc/gen/fpgetsticky.c,v 1.2 2008/02/24 19:22:53 raj Exp $
*/
#include <sys/cdefs.h>
@@ -45,6 +45,7 @@
#include <sys/types.h>
#include <ieeefp.h>
+#ifndef _SOFT_FLOAT
#ifdef __weak_alias
__weak_alias(fpgetsticky,_fpgetsticky)
#endif
@@ -57,3 +58,4 @@
__asm__ __volatile("mffs %0" : "=f"(fpscr));
return ((fp_except_t)((fpscr >> 25) & 0x1f));
}
+#endif
==== //depot/projects/hammer/lib/libc/powerpc/gen/fpsetmask.c#2 (text+ko) ====
@@ -38,11 +38,12 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpsetmask.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpsetmask.c,v 1.2 2008/02/24 19:22:53 raj Exp $");
#include <sys/types.h>
#include <ieeefp.h>
+#ifndef _SOFT_FLOAT
fp_except_t
fpsetmask(fp_except_t mask)
{
@@ -55,3 +56,4 @@
__asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr));
return (old);
}
+#endif
==== //depot/projects/hammer/lib/libc/powerpc/gen/fpsetround.c#2 (text+ko) ====
@@ -38,11 +38,12 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpsetround.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpsetround.c,v 1.2 2008/02/24 19:22:53 raj Exp $");
#include <sys/types.h>
#include <ieeefp.h>
+#ifndef _SOFT_FLOAT
fp_rnd_t
fpsetround(fp_rnd_t rnd_dir)
{
@@ -55,3 +56,4 @@
__asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr));
return (old);
}
+#endif
==== //depot/projects/hammer/lib/libc/sys/clock_gettime.2#10 (text+ko) ====
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/lib/libc/sys/clock_gettime.2,v 1.24 2007/01/09 00:28:14 imp Exp $
+.\" $FreeBSD: src/lib/libc/sys/clock_gettime.2,v 1.25 2008/02/25 13:03:18 brueffer Exp $
.\"
.Dd November 4, 2006
.Dt CLOCK_GETTIME 2
@@ -52,8 +52,8 @@
.Fn clock_gettime
and
.Fn clock_settime
-allow the calling process to retrieve or set the value used by a clock
-which is specified by
+system calls allow the calling process to retrieve or set the value
+used by a clock which is specified by
.Fa clock_id .
.Pp
The
==== //depot/projects/hammer/lib/msun/powerpc/fenv.h#4 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/msun/powerpc/fenv.h,v 1.3 2005/03/16 19:03:45 das Exp $
+ * $FreeBSD: src/lib/msun/powerpc/fenv.h,v 1.4 2008/02/24 19:22:53 raj Exp $
*/
#ifndef _FENV_H_
@@ -82,8 +82,13 @@
#define _ENABLE_MASK ((FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \
FE_OVERFLOW | FE_UNDERFLOW) >> _FPUSW_SHIFT)
+#ifndef _SOFT_FLOAT
#define __mffs(__env) __asm __volatile("mffs %0" : "=f" (*(__env)))
#define __mtfsf(__env) __asm __volatile("mtfsf 255,%0" : : "f" (__env))
+#else
+#define __mffs(__env)
+#define __mtfsf(__env)
+#endif
union __fpscr {
double __d;
==== //depot/projects/hammer/lib/msun/src/e_rem_pio2.c#4 (text+ko) ====
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.15 2008/02/23 12:53:21 bde Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.17 2008/02/25 18:28:58 bde Exp $");
/* __ieee754_rem_pio2(x,y)
*
@@ -56,7 +56,7 @@
__ieee754_rem_pio2(double x, double *y)
{
double z,w,t,r,fn;
- double tx[3];
+ double tx[3],ty[2];
int32_t e0,i,j,nx,n,ix,hx;
u_int32_t low;
@@ -182,7 +182,7 @@
tx[2] = z;
nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */
- n = __kernel_rem_pio2(tx,y,e0,nx,2);
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
- return n;
+ n = __kernel_rem_pio2(tx,ty,e0,nx,1);
+ if(hx<0) {y[0] = -ty[0]; y[1] = -ty[1]; return -n;}
+ y[0] = ty[0]; y[1] = ty[1]; return n;
}
==== //depot/projects/hammer/lib/msun/src/e_rem_pio2f.c#8 (text+ko) ====
@@ -15,12 +15,12 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.24 2008/02/23 12:53:21 bde Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.28 2008/02/25 22:19:17 bde Exp $");
/* __ieee754_rem_pio2f(x,y)
*
- * return the remainder of x rem pi/2 in y[0]+y[1]
- * use double precision internally
+ * return the remainder of x rem pi/2 in *y
+ * use double precision for everything except passing x
* use __kernel_rem_pio2() for large x
*/
@@ -41,11 +41,14 @@
pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
pio2_1t = 6.07710050650619224932e-11; /* 0x3DD0B461, 0x1A626331 */
+#ifdef INLINE_REM_PIO2F
+extern inline
+#endif
int
-__ieee754_rem_pio2f(float x, float *y)
+__ieee754_rem_pio2f(float x, double *y)
{
double w,r,fn;
- double tx[1],ty[2];
+ double tx[1],ty[1];
float z;
int32_t e0,n,ix,hx;
@@ -63,23 +66,20 @@
#endif
r = x-fn*pio2_1;
w = fn*pio2_1t;
- y[0] = r-w;
- y[1] = (r-y[0])-w;
+ *y = r-w;
return n;
}
/*
* all other (large) arguments
*/
if(ix>=0x7f800000) { /* x is inf or NaN */
- y[0]=y[1]=x-x; return 0;
+ *y=x-x; return 0;
}
/* set z = scalbn(|x|,ilogb(|x|)-23) */
e0 = (ix>>23)-150; /* e0 = ilogb(|x|)-23; */
SET_FLOAT_WORD(z, ix - ((int32_t)(e0<<23)));
tx[0] = z;
- n = __kernel_rem_pio2(tx,ty,e0,1,1);
- y[0] = ty[0];
- y[1] = ty[0] - y[0];
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
- return n;
+ n = __kernel_rem_pio2(tx,ty,e0,1,0);
+ if(hx<0) {*y = -ty[0]; return -n;}
+ *y = ty[0]; return n;
}
==== //depot/projects/hammer/lib/msun/src/k_rem_pio2.c#4 (text+ko) ====
@@ -12,7 +12,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.10 2008/02/17 07:31:59 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.11 2008/02/25 11:43:20 bde Exp $");
/*
* __kernel_rem_pio2(x,y,e0,nx,prec)
@@ -78,8 +78,13 @@
* Here is the description of some local variables:
*
* jk jk+1 is the initial number of terms of ipio2[] needed
- * in the computation. The recommended value is 2,3,4,
- * 6 for single, double, extended,and quad.
+ * in the computation. The minimum and recommended value
+ * for jk is 3,4,4,6 for single, double, extended, and quad.
+ * jk+1 must be 2 larger than you might expect so that our
+ * recomputation test works. (Up to 24 bits in the integer
+ * part (the 24 bits of it that we compute) and 23 bits in
+ * the fraction part may be lost to cancelation before we
+ * recompute.)
*
* jz local integer variable indicating the number of
* terms of ipio2[] used.
@@ -129,7 +134,7 @@
#include "math.h"
#include "math_private.h"
-static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
+static const int init_jk[] = {3,4,4,6}; /* initial value for jk */
/*
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
==== //depot/projects/hammer/lib/msun/src/math_private.h#10 (text+ko) ====
@@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD: src/lib/msun/src/math_private.h,v 1.25 2008/02/22 14:11:03 bde Exp $
+ * $FreeBSD: src/lib/msun/src/math_private.h,v 1.26 2008/02/25 13:33:20 bde Exp $
*/
#ifndef _MATH_PRIVATE_H_
@@ -320,7 +320,7 @@
double __kernel_tan(double,double,int);
/* float precision kernel functions */
-int __ieee754_rem_pio2f(float,float*);
+int __ieee754_rem_pio2f(float,double*);
float __kernel_sindf(double);
float __kernel_cosdf(double);
float __kernel_tandf(double,int);
==== //depot/projects/hammer/lib/msun/src/s_cosf.c#6 (text+ko) ====
@@ -15,12 +15,16 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/s_cosf.c,v 1.16 2008/02/22 02:30:35 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/s_cosf.c,v 1.18 2008/02/25 22:19:17 bde Exp $");
+
+#include <float.h>
#include "math.h"
#define INLINE_KERNEL_COSDF
#define INLINE_KERNEL_SINDF
+#define INLINE_REM_PIO2F
#include "math_private.h"
+#include "e_rem_pio2f.c"
#include "k_cosf.c"
#include "k_sinf.c"
@@ -34,7 +38,7 @@
float
cosf(float x)
{
- float y[2];
+ double y;
int32_t n, hx, ix;
GET_FLOAT_WORD(hx,x);
@@ -71,13 +75,13 @@
/* general argument reduction needed */
else {
- n = __ieee754_rem_pio2f(x,y);
+ n = __ieee754_rem_pio2f(x,&y);
switch(n&3) {
- case 0: return __kernel_cosdf((double)y[0]+y[1]);
- case 1: return __kernel_sindf(-(double)y[0]-y[1]);
- case 2: return -__kernel_cosdf((double)y[0]+y[1]);
+ case 0: return __kernel_cosdf(y);
+ case 1: return __kernel_sindf(-y);
+ case 2: return -__kernel_cosdf(y);
default:
- return __kernel_sindf((double)y[0]+y[1]);
+ return __kernel_sindf(y);
}
}
}
==== //depot/projects/hammer/lib/msun/src/s_sinf.c#5 (text+ko) ====
@@ -15,12 +15,16 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/s_sinf.c,v 1.15 2008/02/22 02:30:36 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/s_sinf.c,v 1.17 2008/02/25 22:19:17 bde Exp $");
+
+#include <float.h>
#include "math.h"
#define INLINE_KERNEL_COSDF
#define INLINE_KERNEL_SINDF
+#define INLINE_REM_PIO2F
#include "math_private.h"
+#include "e_rem_pio2f.c"
#include "k_cosf.c"
#include "k_sinf.c"
@@ -34,7 +38,7 @@
float
sinf(float x)
{
- float y[2];
+ double y;
int32_t n, hx, ix;
GET_FLOAT_WORD(hx,x);
@@ -69,13 +73,13 @@
/* general argument reduction needed */
else {
- n = __ieee754_rem_pio2f(x,y);
+ n = __ieee754_rem_pio2f(x,&y);
switch(n&3) {
- case 0: return __kernel_sindf((double)y[0]+y[1]);
- case 1: return __kernel_cosdf((double)y[0]+y[1]);
- case 2: return __kernel_sindf(-(double)y[0]-y[1]);
+ case 0: return __kernel_sindf(y);
+ case 1: return __kernel_cosdf(y);
+ case 2: return __kernel_sindf(-y);
default:
- return -__kernel_cosdf((double)y[0]+y[1]);
+ return -__kernel_cosdf(y);
}
}
}
==== //depot/projects/hammer/lib/msun/src/s_tanf.c#5 (text+ko) ====
@@ -15,11 +15,15 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/s_tanf.c,v 1.15 2008/02/22 02:30:36 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/s_tanf.c,v 1.17 2008/02/25 22:19:17 bde Exp $");
+
+#include <float.h>
#include "math.h"
#define INLINE_KERNEL_TANDF
+#define INLINE_REM_PIO2F
#include "math_private.h"
+#include "e_rem_pio2f.c"
#include "k_tanf.c"
/* Small multiples of pi/2 rounded to double precision. */
@@ -32,7 +36,7 @@
float
tanf(float x)
{
- float y[2];
+ double y;
int32_t n, hx, ix;
GET_FLOAT_WORD(hx,x);
@@ -61,8 +65,8 @@
/* general argument reduction needed */
else {
- n = __ieee754_rem_pio2f(x,y);
+ n = __ieee754_rem_pio2f(x,&y);
/* integer parameter: 1 -- n even; -1 -- n odd */
- return __kernel_tandf((double)y[0]+y[1],1-((n&1)<<1));
+ return __kernel_tandf(y,1-((n&1)<<1));
}
}
==== //depot/projects/hammer/sbin/ping6/ping6.c#12 (text+ko) ====
@@ -78,7 +78,7 @@
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/ping6/ping6.c,v 1.32 2007/11/20 01:58:34 dd Exp $";
+ "$FreeBSD: src/sbin/ping6/ping6.c,v 1.33 2008/02/25 10:45:25 silby Exp $";
#endif /* not lint */
/*
@@ -457,9 +457,9 @@
if (interval.tv_sec < 0)
errx(1, "illegal timing interval %s", optarg);
/* less than 1/hz does not make sense */
- if (interval.tv_sec == 0 && interval.tv_usec < 10000) {
- warnx("too small interval, raised to 0.01");
- interval.tv_usec = 10000;
+ if (interval.tv_sec == 0 && interval.tv_usec < 1) {
+ warnx("too small interval, raised to .000001");
+ interval.tv_usec = 1;
}
options |= F_INTERVAL;
break;
==== //depot/projects/hammer/share/man/man9/VOP_LOCK.9#10 (text+ko) ====
@@ -26,9 +26,9 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/VOP_LOCK.9,v 1.22 2008/01/18 22:09:29 attilio Exp $
+.\" $FreeBSD: src/share/man/man9/VOP_LOCK.9,v 1.23 2008/02/25 19:12:01 attilio Exp $
.\"
-.Dd January 19, 2008
+.Dd February 25, 2008
.Os
.Dt VOP_LOCK 9
.Sh NAME
@@ -46,7 +46,7 @@
.Ft int
.Fn VOP_UNLOCK "struct vnode *vp" "int flags"
.Ft int
-.Fn VOP_ISLOCKED "struct vnode *vp" "struct thread *td"
+.Fn VOP_ISLOCKED "struct vnode *vp"
.Ft int
.Fn vn_lock "struct vnode *vp" "int flags"
.Sh DESCRIPTION
@@ -101,9 +101,6 @@
.It Dv LK_RETRY
Retry until locked.
.El
-.It Fa td
-Thread context to use for the locks.
-.El
.Pp
Kernel code should use
.Fn vn_lock
==== //depot/projects/hammer/share/man/man9/lock.9#12 (text+ko) ====
@@ -24,9 +24,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
.\" DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/lock.9,v 1.25 2008/02/14 19:39:09 brueffer Exp $
+.\" $FreeBSD: src/share/man/man9/lock.9,v 1.26 2008/02/25 19:12:01 attilio Exp $
.\"
-.Dd February 13, 2008
+.Dd February 25, 2008
.Dt LOCK 9
.Os
.Sh NAME
@@ -49,7 +49,7 @@
.Ft int
.Fn lockmgr "struct lock *lkp" "u_int flags" "struct mtx *interlkp"
.Ft int
-.Fn lockstatus "struct lock *lkp" "struct thread *td"
+.Fn lockstatus "struct lock *lkp"
.Ft void
.Fn lockmgr_disown "struct lock *lkp"
.Ft void
@@ -180,20 +180,11 @@
.Pp
The
.Fn lockstatus
-function returns the status of the lock in relation to the
-.Vt thread
-passed to it.
-Note that if
-.Fa td
-is
-.Dv NULL
-and an exclusive lock is held,
-.Dv LK_EXCLUSIVE
-will be returned.
+function returns the status of the lock in relation to the current thread.
.Pp
The
.Fn lockmgr_disown
-function switches the owner from curthread to be
+function switches the owner from the current thread to be
.Dv LK_KERNPROC,
if the lock is already held.
.Pp
@@ -283,11 +274,9 @@
function returns:
.Bl -tag -width ".Dv LK_EXCLUSIVE"
.It Dv LK_EXCLUSIVE
-An exclusive lock is held by the thread
-.Fa td .
+An exclusive lock is held by the current thread.
.It Dv LK_EXCLOTHER
-An exclusive lock is held by someone other than the thread
-.Fa td .
+An exclusive lock is held by someone other than the current thread.
.It Dv LK_SHARED
A shared lock is held.
.It Li 0
==== //depot/projects/hammer/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#8 (text+ko) ====
@@ -1113,7 +1113,7 @@
int ltype = 0;
if (cnp->cn_flags & ISDOTDOT) {
- ltype = VOP_ISLOCKED(dvp, td);
+ ltype = VOP_ISLOCKED(dvp);
VOP_UNLOCK(dvp, 0);
}
error = vn_lock(*vpp, cnp->cn_lkflags);
@@ -1171,7 +1171,7 @@
/* ARGSUSED */
static int
zfs_create(vnode_t *dvp, char *name, vattr_t *vap, int excl, int mode,
- vnode_t **vpp, cred_t *cr, kthread_t *td)
+ vnode_t **vpp, cred_t *cr)
{
znode_t *zp, *dzp = VTOZ(dvp);
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
@@ -3245,7 +3245,7 @@
mode = vap->va_mode & ALLPERMS;
return (zfs_create(ap->a_dvp, cnp->cn_nameptr, vap, !EXCL, mode,
- ap->a_vpp, cnp->cn_cred, cnp->cn_thread));
+ ap->a_vpp, cnp->cn_cred));
}
static int
==== //depot/projects/hammer/sys/dev/atkbdc/psm.c#9 (text+ko) ====
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list