diff options
author | jhb <jhb@FreeBSD.org> | 2002-04-11 21:01:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-04-11 21:01:34 +0000 |
commit | 7674fba7307b26d8d92a4a0b95520cf386d02667 (patch) | |
tree | 2fd1d0467ab6b2fda86e642aa72a968b5a9fb6fb | |
parent | afc32a4ae3be31bf9b667ece0044d8657566abfd (diff) | |
download | FreeBSD-src-7674fba7307b26d8d92a4a0b95520cf386d02667.zip FreeBSD-src-7674fba7307b26d8d92a4a0b95520cf386d02667.tar.gz |
Commented out locking that would be used in the ps command if locks were
used in ddb.
-rw-r--r-- | sys/ddb/db_ps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index d1e3245..9468f63 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -55,6 +55,7 @@ db_ps(dummy1, dummy2, dummy3, dummy4) np = nprocs; + /* sx_slock(&allproc_lock); */ if (!LIST_EMPTY(&allproc)) p = LIST_FIRST(&allproc); else @@ -90,6 +91,7 @@ db_ps(dummy1, dummy2, dummy3, dummy4) printf("oops, ran out of processes early!\n"); break; } + /* PROC_LOCK(p); */ pp = p->p_pptr; if (pp == NULL) pp = p; @@ -126,8 +128,11 @@ db_ps(dummy1, dummy2, dummy3, dummy4) } db_printf(" %s\n", p->p_comm); } + /* PROC_UNLOCK(p); */ + p = LIST_NEXT(p, p_list); if (p == NULL && np > 0) p = LIST_FIRST(&zombproc); } + /* sx_sunlock(&allproc_lock); */ } |