Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/chs-ubc2]: src/sys Update from trunk.
details: https://anonhg.NetBSD.org/src/rev/e331d0b6b653
branches: chs-ubc2
changeset: 471417:e331d0b6b653
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Aug 02 19:30:58 1999 +0000
description:
Update from trunk.
diffstat:
sys/adosfs/adlookup.c | 41 ++++-
sys/adosfs/adosfs.h | 3 +-
sys/adosfs/adutil.c | 6 +-
sys/adosfs/advnops.c | 59 +---------
sys/arch/alpha/alpha/conf.c | 13 +-
sys/arch/alpha/alpha/cpu.c | 8 +-
sys/arch/alpha/alpha/db_trace.c | 220 ++++++++++++++++++++---------------
sys/arch/alpha/alpha/lock_machdep.c | 24 ++-
sys/arch/alpha/alpha/locore.s | 72 ++++++++++-
sys/arch/alpha/alpha/pmap.c | 30 +++-
sys/arch/alpha/alpha/prom.c | 16 +-
sys/arch/alpha/alpha/vm_machdep.c | 8 +-
12 files changed, 291 insertions(+), 209 deletions(-)
diffs (truncated from 1008 to 300 lines):
diff -r dcb6b63ebbe2 -r e331d0b6b653 sys/adosfs/adlookup.c
--- a/sys/adosfs/adlookup.c Sun Aug 01 05:17:45 1999 +0000
+++ b/sys/adosfs/adlookup.c Mon Aug 02 19:30:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adlookup.c,v 1.22 1998/08/09 20:20:11 perry Exp $ */
+/* $NetBSD: adlookup.c,v 1.22.8.1 1999/08/02 19:30:58 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -88,6 +88,7 @@
*vpp = NULL;
ucp = cnp->cn_cred;
nameiop = cnp->cn_nameiop;
+ cnp->cn_flags &= ~PDIRUNLOCK;
flags = cnp->cn_flags;
p = cnp->cn_proc;
last = flags & ISLASTCN;
@@ -121,25 +122,33 @@
error = 0;
} else if (flags & ISDOTDOT) {
VOP_UNLOCK(vdp, 0); /* race */
+ cnp->cn_flags |= PDIRUNLOCK;
error = vget(*vpp, LK_EXCLUSIVE);
- if (error == 0 && lockp && last)
- error = vn_lock(vdp, LK_EXCLUSIVE);
+ if (error == 0 && lockp && last) {
+ if ((error = vn_lock(vdp, LK_EXCLUSIVE)))
+ cnp->cn_flags &= ~PDIRUNLOCK;
+ }
} else {
error = vget(*vpp, LK_EXCLUSIVE);
/* if (lockp == 0 || error || last) */
- if (lockp == 0 || error || last == 0)
+ if (lockp == 0 || error || last == 0) {
VOP_UNLOCK(vdp, 0);
+ cnp->cn_flags |= PDIRUNLOCK;
+ }
}
if (error == 0) {
if (vpid == vdp->v_id)
return (0);
vput(*vpp);
- if (lockp && vdp != *vpp && last)
+ if (lockp && vdp != *vpp && last) {
VOP_UNLOCK(vdp, 0);
+ cnp->cn_flags |= PDIRUNLOCK;
+ }
}
*vpp = NULL;
if ((error = vn_lock(vdp, LK_EXCLUSIVE)) != 0)
return (error);
+ cnp->cn_flags &= ~PDIRUNLOCK;
}
/*
@@ -173,12 +182,18 @@
*
*/
VOP_UNLOCK(vdp, 0); /* race */
+ cnp->cn_flags |= PDIRUNLOCK;
if ((error = VFS_VGET(vdp->v_mount,
- (ino_t)adp->pblock, vpp)) != 0)
- vn_lock(vdp, LK_EXCLUSIVE | LK_RETRY);
- else if (last && lockp &&
- (error = vn_lock(vdp, LK_EXCLUSIVE)))
+ (ino_t)adp->pblock, vpp)) != 0) {
+ if (vn_lock(vdp, LK_EXCLUSIVE | LK_RETRY) == 0)
+ cnp->cn_flags &= ~PDIRUNLOCK;
+ } else if (last && lockp ) {
+ if ((error = vn_lock(vdp, LK_EXCLUSIVE))) {
vput(*vpp);
+ } else {
+ cnp->cn_flags &= ~PDIRUNLOCK;
+ }
+ }
if (error) {
*vpp = NULL;
return (error);
@@ -239,8 +254,10 @@
#endif
return (error);
}
- if (lockp == 0)
+ if (lockp == 0) {
VOP_UNLOCK(vdp, 0);
+ cnp->cn_flags |= PDIRUNLOCK;
+ }
cnp->cn_nameiop |= SAVENAME;
#ifdef ADOSFS_DIAGNOSTIC
printf("EJUSTRETURN)");
@@ -277,8 +294,10 @@
}
if (vdp == *vpp)
VREF(vdp);
- else if (lockp == 0 || last == 0)
+ else if (lockp == 0 || last == 0) {
VOP_UNLOCK(vdp, 0);
+ cnp->cn_flags |= PDIRUNLOCK;
+ }
found_lockdone:
if ((cnp->cn_flags & MAKEENTRY) && nocache == 0)
cache_enter(vdp, *vpp, cnp);
diff -r dcb6b63ebbe2 -r e331d0b6b653 sys/adosfs/adosfs.h
--- a/sys/adosfs/adosfs.h Sun Aug 01 05:17:45 1999 +0000
+++ b/sys/adosfs/adosfs.h Mon Aug 02 19:30:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adosfs.h,v 1.15.8.1 1999/06/21 00:44:32 thorpej Exp $ */
+/* $NetBSD: adosfs.h,v 1.15.8.2 1999/08/02 19:30:59 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -80,7 +80,6 @@
u_long lastlindblk; /* (f/hf) last logical indirect block */
u_long lastindblk; /* (f/hf) last indirect block read */
u_long *tab; /* (r/d) hash table */
- struct lock lock; /* node lock */
int *tabi; /* (r/d) table info */
int ntabent; /* (r/d) number of entries in table */
int nwords; /* size of blocks in long words */
diff -r dcb6b63ebbe2 -r e331d0b6b653 sys/adosfs/adutil.c
--- a/sys/adosfs/adutil.c Sun Aug 01 05:17:45 1999 +0000
+++ b/sys/adosfs/adutil.c Mon Aug 02 19:30:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adutil.c,v 1.17.10.1 1999/06/21 00:44:32 thorpej Exp $ */
+/* $NetBSD: adutil.c,v 1.17.10.2 1999/08/02 19:30:59 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -78,13 +78,15 @@
/*
* insert in hash table and lock
+ *
+ * ap->vp must have been initialized before this call.
*/
void
adosfs_ainshash(amp, ap)
struct adosfsmount *amp;
struct anode *ap;
{
- lockmgr(&ap->lock, LK_EXCLUSIVE, (struct simplelock *)0);
+ lockmgr(&ap->vp->v_lock, LK_EXCLUSIVE, (struct simplelock *)0);
simple_lock(&adosfs_hashlock);
LIST_INSERT_HEAD(&->anodetab[AHASH(ap->block)], ap, link);
diff -r dcb6b63ebbe2 -r e331d0b6b653 sys/adosfs/advnops.c
--- a/sys/adosfs/advnops.c Sun Aug 01 05:17:45 1999 +0000
+++ b/sys/adosfs/advnops.c Mon Aug 02 19:30:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advnops.c,v 1.48.4.1 1999/06/21 00:44:32 thorpej Exp $ */
+/* $NetBSD: advnops.c,v 1.48.4.2 1999/08/02 19:30:59 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -66,15 +66,12 @@
int adosfs_link __P((void *));
int adosfs_symlink __P((void *));
#define adosfs_abortop genfs_abortop
-int adosfs_lock __P((void *));
-int adosfs_unlock __P((void *));
int adosfs_bmap __P((void *));
int adosfs_print __P((void *));
int adosfs_readdir __P((void *));
int adosfs_access __P((void *));
int adosfs_readlink __P((void *));
int adosfs_inactive __P((void *));
-int adosfs_islocked __P((void *));
int adosfs_reclaim __P((void *));
int adosfs_pathconf __P((void *));
@@ -130,12 +127,12 @@
{ &vop_abortop_desc, adosfs_abortop }, /* abortop */
{ &vop_inactive_desc, adosfs_inactive }, /* inactive */
{ &vop_reclaim_desc, adosfs_reclaim }, /* reclaim */
- { &vop_lock_desc, adosfs_lock }, /* lock */
- { &vop_unlock_desc, adosfs_unlock }, /* unlock */
+ { &vop_lock_desc, genfs_lock }, /* lock */
+ { &vop_unlock_desc, genfs_unlock }, /* unlock */
{ &vop_bmap_desc, adosfs_bmap }, /* bmap */
{ &vop_strategy_desc, adosfs_strategy }, /* strategy */
{ &vop_print_desc, adosfs_print }, /* print */
- { &vop_islocked_desc, adosfs_islocked }, /* islocked */
+ { &vop_islocked_desc, genfs_islocked }, /* islocked */
{ &vop_pathconf_desc, adosfs_pathconf }, /* pathconf */
{ &vop_advlock_desc, adosfs_advlock }, /* advlock */
{ &vop_blkatoff_desc, adosfs_blkatoff }, /* blkatoff */
@@ -435,43 +432,6 @@
}
/*
- * lock the anode
- */
-int
-adosfs_lock(v)
- void *v;
-{
- struct vop_lock_args /* {
- struct vnode *a_vp;
- int a_flags;
- struct proc *a_p;
- } */ *sp = v;
- struct vnode *vp = sp->a_vp;
-
- return (lockmgr(&VTOA(vp)->lock, sp->a_flags, &vp->v_interlock));
-
-}
-
-/*
- * unlock an anode
- */
-int
-adosfs_unlock(v)
- void *v;
-{
- struct vop_unlock_args /* {
- struct vnode *a_vp;
- int a_flags;
- struct proc *a_p;
- } */ *sp = v;
- struct vnode *vp = sp->a_vp;
-
- return (lockmgr(&VTOA(vp)->lock, sp->a_flags | LK_RELEASE,
- &vp->v_interlock));
-}
-
-
-/*
* Wait until the vnode has finished changing state.
*/
int
@@ -897,17 +857,6 @@
return(0);
}
-int
-adosfs_islocked(v)
- void *v;
-{
- struct vop_islocked_args /* {
- struct vnode *a_vp;
- } */ *sp = v;
-
- return (lockstatus(&VTOA(sp->a_vp)->lock));
-}
-
/*
* the kernel wants its vnode back.
* no lock needed we are being called from vclean()
diff -r dcb6b63ebbe2 -r e331d0b6b653 sys/arch/alpha/alpha/conf.c
--- a/sys/arch/alpha/alpha/conf.c Sun Aug 01 05:17:45 1999 +0000
+++ b/sys/arch/alpha/alpha/conf.c Mon Aug 02 19:30:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.38.2.1.2.1 1999/06/21 00:46:02 thorpej Exp $ */
+/* $NetBSD: conf.c,v 1.38.2.1.2.2 1999/08/02 19:32:41 thorpej Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.38.2.1.2.1 1999/06/21 00:46:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.38.2.1.2.2 1999/08/02 19:32:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -170,6 +170,8 @@
cdev_decl(wskbd);
#include "wsmouse.h"
cdev_decl(wsmouse);
+#include "wsmux.h"
+cdev_decl(wsmux);
#include "spkr.h"
cdev_decl(spkr);
@@ -313,6 +315,7 @@
cdev_notdef(), /* 54 */
cdev_notdef(), /* 55 */
#endif
+ cdev_mouse_init(NWSMUX, wsmux), /* 56: ws multiplexor */
};
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
@@ -406,6 +409,12 @@
/* 48 */ NODEV,
/* 49 */ NODEV,
/* 50 */ NODEV,
+ /* 51 */ NODEV,
+ /* 52 */ NODEV,
+ /* 53 */ NODEV,
+ /* 54 */ NODEV,
+ /* 55 */ NODEV,
+ /* 56 */ NODEV,
};
/*
diff -r dcb6b63ebbe2 -r e331d0b6b653 sys/arch/alpha/alpha/cpu.c
--- a/sys/arch/alpha/alpha/cpu.c Sun Aug 01 05:17:45 1999 +0000
+++ b/sys/arch/alpha/alpha/cpu.c Mon Aug 02 19:30:58 1999 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index