Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Merge the nathanw_sa branch.
details: https://anonhg.NetBSD.org/src/rev/5844e6c8d679
branches: trunk
changeset: 541770:5844e6c8d679
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Jan 18 08:51:40 2003 +0000
description:
Merge the nathanw_sa branch.
diffstat:
sys/conf/files | 4 +-
sys/ddb/db_trap.c | 15 +-
sys/ddb/db_xxx.c | 59 +++++++--
sys/dev/kttcp.c | 3 +-
sys/miscfs/genfs/genfs_vnops.c | 14 +-
sys/miscfs/portal/portal_vnops.c | 17 +-
sys/miscfs/procfs/procfs.h | 12 +-
sys/miscfs/procfs/procfs_ctl.c | 34 +++--
sys/miscfs/procfs/procfs_fpregs.c | 13 +-
sys/miscfs/procfs/procfs_regs.c | 10 +-
sys/miscfs/procfs/procfs_status.c | 13 +-
sys/miscfs/procfs/procfs_subr.c | 22 ++-
sys/miscfs/syncfs/sync_subr.c | 8 +-
sys/nfs/nfs_bio.c | 6 +-
sys/nfs/nfs_nqlease.c | 11 +-
sys/nfs/nfs_syscalls.c | 44 ++++---
sys/nfs/nfs_var.h | 10 +-
sys/nfs/nqnfs.h | 4 +-
sys/sys/Makefile | 12 +-
sys/sys/cdefs_elf.h | 5 +-
sys/sys/clockctl.h | 5 +-
sys/sys/exec.h | 9 +-
sys/sys/exec_ecoff.h | 4 +-
sys/sys/exec_elf.h | 6 +-
sys/sys/lock.h | 4 +-
sys/sys/lwp.h | 187 +++++++++++++++++++++++++++++++
sys/sys/param.h | 5 +-
sys/sys/proc.h | 186 ++++++++++++------------------
sys/sys/ptrace.h | 20 +-
sys/sys/resourcevar.h | 6 +-
sys/sys/sa.h | 64 ++++++++++
sys/sys/savar.h | 114 +++++++++++++++++++
sys/sys/sched.h | 27 +++-
sys/sys/signal.h | 91 +++-----------
sys/sys/signalvar.h | 21 ++-
sys/sys/sigtypes.h | 148 ++++++++++++++++++++++++
sys/sys/sysctl.h | 34 +++++-
sys/sys/systm.h | 28 ++--
sys/sys/time.h | 60 +++++++++-
sys/sys/types.h | 8 +-
sys/sys/ucontext.h | 111 ++++++++++++++++++
sys/sys/user.h | 3 +-
sys/ufs/lfs/lfs_syscalls.c | 20 ++-
sys/ufs/lfs/lfs_vnops.c | 7 +-
sys/ufs/mfs/mfs_vfsops.c | 12 +-
sys/uvm/uvm_amap.c | 8 +-
sys/uvm/uvm_aobj.c | 8 +-
sys/uvm/uvm_extern.h | 20 +-
sys/uvm/uvm_fault.c | 12 +-
sys/uvm/uvm_glue.c | 228 ++++++++++++++++++++-----------------
sys/uvm/uvm_map.c | 26 ++--
sys/uvm/uvm_meter.c | 54 ++++----
sys/uvm/uvm_mmap.c | 68 ++++++----
sys/uvm/uvm_pmap.h | 8 +-
sys/uvm/uvm_swap.c | 10 +-
sys/uvm/uvm_unix.c | 14 +-
56 files changed, 1353 insertions(+), 599 deletions(-)
diffs (truncated from 4305 to 300 lines):
diff -r d20180540b59 -r 5844e6c8d679 sys/conf/files
--- a/sys/conf/files Sat Jan 18 08:49:59 2003 +0000
+++ b/sys/conf/files Sat Jan 18 08:51:40 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.587 2002/12/26 12:31:24 jdolecek Exp $
+# $NetBSD: files,v 1.588 2003/01/18 08:51:40 thorpej Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -1049,6 +1049,7 @@
file kern/kern_systrace.c systrace
file kern/kern_lkm.c lkm
file kern/kern_lock.c
+file kern/kern_lwp.c
file kern/kern_malloc.c
file kern/kern_malloc_debug.c malloc_debug
file kern/kern_ntptime.c
@@ -1057,6 +1058,7 @@
file kern/kern_prot.c
file kern/kern_ras.c
file kern/kern_resource.c
+file kern/kern_sa.c
file kern/kern_sig.c
file kern/kern_subr.c
file kern/kern_synch.c
diff -r d20180540b59 -r 5844e6c8d679 sys/ddb/db_trap.c
--- a/sys/ddb/db_trap.c Sat Jan 18 08:49:59 2003 +0000
+++ b/sys/ddb/db_trap.c Sat Jan 18 08:51:40 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trap.c,v 1.19 2002/02/15 07:33:53 simonb Exp $ */
+/* $NetBSD: db_trap.c,v 1.20 2003/01/18 08:54:22 thorpej Exp $ */
/*
* Mach Operating System
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trap.c,v 1.19 2002/02/15 07:33:53 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trap.c,v 1.20 2003/01/18 08:54:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -71,15 +71,20 @@
"(%d loads, %d stores),\n",
db_inst_count, db_load_count, db_store_count);
}
- if (curproc != NULL) {
+ if (curlwp != NULL) {
if (bkpt)
db_printf("Breakpoint");
else if (watchpt)
db_printf("Watchpoint");
else
db_printf("Stopped");
- db_printf(" in pid %d (%s) at\t", curproc->p_pid,
- curproc->p_comm);
+ if (curproc == NULL)
+ db_printf("; curlwp = %p,"
+ " curproc is NULL at\t", curlwp);
+ else
+ db_printf(" in pid %d.%d (%s) at\t",
+ curproc->p_pid, curlwp->l_lid,
+ curproc->p_comm);
} else if (bkpt)
db_printf("Breakpoint at\t");
else if (watchpt)
diff -r d20180540b59 -r 5844e6c8d679 sys/ddb/db_xxx.c
--- a/sys/ddb/db_xxx.c Sat Jan 18 08:49:59 2003 +0000
+++ b/sys/ddb/db_xxx.c Sat Jan 18 08:51:40 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_xxx.c,v 1.17 2002/08/26 11:34:29 scw Exp $ */
+/* $NetBSD: db_xxx.c,v 1.18 2003/01/18 08:54:22 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.17 2002/08/26 11:34:29 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.18 2003/01/18 08:54:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,18 +103,21 @@
db_show_all_procs(db_expr_t addr, int haddr, db_expr_t count, char *modif)
{
int i;
+
char *mode;
- struct proc *p, *pp;
+ struct proc *p, *pp, *cp;
+ struct lwp *l, *cl;
struct timeval tv[2];
const struct proclist_desc *pd;
if (modif[0] == 0)
modif[0] = 'n'; /* default == normal mode */
- mode = strchr("mawn", modif[0]);
+ mode = strchr("mawln", modif[0]);
if (mode == NULL || *mode == 'm') {
db_printf("usage: show all procs [/a] [/n] [/w]\n");
db_printf("\t/a == show process address info\n");
+ db_printf("\t/l == show LWP info\n");
db_printf("\t/n == show normal process info [default]\n");
db_printf("\t/w == show process wait/emul info\n");
return;
@@ -125,9 +128,13 @@
db_printf(" PID %10s %18s %18s %18s\n",
"COMMAND", "STRUCT PROC *", "UAREA *", "VMSPACE/VM_MAP");
break;
+ case 'l':
+ db_printf(" PID %4s S %7s %18s %18s %-12s\n",
+ "LID", "FLAGS", "STRUCT LWP *", "UAREA *", "WAIT");
+ break;
case 'n':
- db_printf(" PID %10s %10s %10s S %7s %16s %7s\n",
- "PPID", "PGRP", "UID", "FLAGS", "COMMAND", "WAIT");
+ db_printf(" PID %8s %8s %10s S %7s %4s %16s %7s\n",
+ "PPID", "PGRP", "UID", "FLAGS", "LWPS", "COMMAND", "WAIT");
break;
case 'w':
db_printf(" PID %10s %8s %4s %5s %5s %-12s%s\n",
@@ -138,44 +145,64 @@
/* XXX LOCKING XXX */
pd = proclists;
+ cp = curproc;
+ cl = curlwp;
for (pd = proclists; pd->pd_list != NULL; pd++) {
LIST_FOREACH(p, pd->pd_list, p_list) {
pp = p->p_pptr;
if (p->p_stat == 0) {
continue;
}
-
- db_printf("%c%-10d", " >"[curproc == p], p->p_pid);
+ l = LIST_FIRST(&p->p_lwps);
+ db_printf("%c%-10d", " >"[cp == p], p->p_pid);
switch (*mode) {
case 'a':
db_printf("%10.10s %18p %18p %18p\n",
- p->p_comm, p, p->p_addr, p->p_vmspace);
+ p->p_comm, p, l->l_addr, p->p_vmspace);
break;
+ case 'l':
+ do {
+ db_printf("%c%4d %d %#7x %18p %18p %s\n",
+ " >"[cl == l], l->l_lid,
+ l->l_stat, l->l_flag, l,
+ l->l_addr,
+ (l->l_wchan && l->l_wmesg) ?
+ l->l_wmesg : "");
+ l = LIST_NEXT(l, l_sibling);
+ if (l)
+ db_printf("%11s","");
+ } while (l != NULL);
+ break;
case 'n':
- db_printf("%10d %10d %10d %d %#7x %16s %7.7s\n",
+ db_printf("%8d %8d %10d %d %#7x %4d %16s %7.7s\n",
pp ? pp->p_pid : -1, p->p_pgrp->pg_id,
p->p_cred->p_ruid, p->p_stat, p->p_flag,
- p->p_comm, (p->p_wchan && p->p_wmesg) ?
- p->p_wmesg : "");
+ p->p_nlwps, p->p_comm,
+ (p->p_nlwps > 1) ? "*" : (
+ (l->l_wchan && l->l_wmesg) ?
+ l->l_wmesg : ""));
break;
case 'w':
db_printf("%10s %8s %4d", p->p_comm,
- p->p_emul->e_name,p->p_priority);
+ p->p_emul->e_name,l->l_priority);
calcru(p, &tv[0], &tv[1], NULL);
for (i = 0; i < 2; ++i) {
db_printf("%4ld.%1ld",
(long)tv[i].tv_sec,
(long)tv[i].tv_usec/100000);
}
- if (p->p_wchan && p->p_wmesg) {
- db_printf(" %-12s", p->p_wmesg);
+ if (p->p_nlwps <= 1) {
+ if (l->l_wchan && l->l_wmesg) {
+ db_printf(" %-12s", l->l_wmesg);
db_printsym(
- (db_expr_t)(intptr_t)p->p_wchan,
+ (db_expr_t)(intptr_t)l->l_wchan,
DB_STGY_XTRN, db_printf);
+ } } else {
+ db_printf(" * ");
}
db_printf("\n");
break;
diff -r d20180540b59 -r 5844e6c8d679 sys/dev/kttcp.c
--- a/sys/dev/kttcp.c Sat Jan 18 08:49:59 2003 +0000
+++ b/sys/dev/kttcp.c Sat Jan 18 08:51:40 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kttcp.c,v 1.6 2002/10/23 09:13:01 jdolecek Exp $ */
+/* $NetBSD: kttcp.c,v 1.7 2003/01/18 09:45:08 thorpej Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -77,6 +77,7 @@
#include <sys/socketvar.h>
#include <sys/socket.h>
#include <sys/mbuf.h>
+#include <sys/sa.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
diff -r d20180540b59 -r 5844e6c8d679 sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c Sat Jan 18 08:49:59 2003 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c Sat Jan 18 08:51:40 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_vnops.c,v 1.68 2002/11/15 14:01:57 yamt Exp $ */
+/* $NetBSD: genfs_vnops.c,v 1.69 2003/01/18 09:18:05 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.68 2002/11/15 14:01:57 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.69 2003/01/18 09:18:05 thorpej Exp $");
#include "opt_nfsserver.h"
@@ -473,7 +473,7 @@
struct genfs_node *gp = VTOG(vp);
struct uvm_object *uobj = &vp->v_uobj;
struct vm_page *pg, *pgs[MAX_READ_AHEAD];
- struct ucred *cred = curproc->p_ucred; /* XXXUBC curproc */
+ struct ucred *cred = curproc->p_ucred; /* XXXUBC curlwp */
boolean_t async = (flags & PGO_SYNCIO) == 0;
boolean_t write = (ap->a_access_type & VM_PROT_WRITE) != 0;
boolean_t sawhole = FALSE;
@@ -1087,7 +1087,7 @@
if (by_list) {
pg = TAILQ_FIRST(&uobj->memq);
TAILQ_INSERT_TAIL(&uobj->memq, &endmp, listq);
- PHOLD(curproc);
+ PHOLD(curlwp);
} else {
pg = uvm_pagelookup(uobj, off);
}
@@ -1126,7 +1126,7 @@
* wait for it to become unbusy.
*/
- yield = (curproc->p_cpu->ci_schedstate.spc_flags &
+ yield = (curlwp->l_cpu->ci_schedstate.spc_flags &
SPCF_SHOULDYIELD) && !pagedaemon;
if (pg->flags & PG_BUSY || yield) {
KASSERT(!pagedaemon);
@@ -1138,7 +1138,7 @@
}
if (yield) {
simple_unlock(slock);
- preempt(NULL);
+ preempt(1);
simple_lock(slock);
} else {
pg->flags |= PG_WANTED;
@@ -1315,7 +1315,7 @@
}
if (by_list) {
TAILQ_REMOVE(&uobj->memq, &endmp, listq);
- PRELE(curproc);
+ PRELE(curlwp);
}
/*
diff -r d20180540b59 -r 5844e6c8d679 sys/miscfs/portal/portal_vnops.c
--- a/sys/miscfs/portal/portal_vnops.c Sat Jan 18 08:49:59 2003 +0000
+++ b/sys/miscfs/portal/portal_vnops.c Sat Jan 18 08:51:40 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: portal_vnops.c,v 1.43 2002/08/03 04:52:45 simonb Exp $ */
+/* $NetBSD: portal_vnops.c,v 1.44 2003/01/18 09:18:06 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: portal_vnops.c,v 1.43 2002/08/03 04:52:45 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: portal_vnops.c,v 1.44 2003/01/18 09:18:06 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -63,6 +63,7 @@
#include <sys/socketvar.h>
Home |
Main Index |
Thread Index |
Old Index