FIxed the following style bugs:

- clobbering of jsp's $Id$ by FreeBSD's old $Id$.
- long lines in recent KSE changes (procfs_ctl.c).
- other style bugs in KSE changes (most related to an shadowed variable
  in procfs_status.c -- the td in the outer scope is obfuscated by
  PFS_FILL_ARGS).

Approved by:	des
This commit is contained in:
Bruce Evans 2002-02-16 05:59:26 +00:00
parent a76d60f014
commit a21759a1a9
2 changed files with 16 additions and 10 deletions

View File

@ -35,6 +35,9 @@
* SUCH DAMAGE.
*
* @(#)procfs_ctl.c 8.4 (Berkeley) 6/15/94
*
* From:
* $Id: procfs_ctl.c,v 3.2 1993/12/15 09:40:17 jsp Exp $
* $FreeBSD$
*/
@ -190,7 +193,7 @@ out:
/*
* do single-step fixup if needed
*/
FIX_SSTEP(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */
FIX_SSTEP(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */
#endif
/*
@ -349,13 +352,15 @@ procfs_doprocctl(PFS_FILL_ARGS)
PROC_LOCK(p);
mtx_lock_spin(&sched_lock);
/* This is very broken XXXKSE */
/* This is very broken XXXKSE: */
if (TRACE_WAIT_P(td->td_proc, p)) {
p->p_xstat = nm->nm_val;
#ifdef FIX_SSTEP
FIX_SSTEP(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */
/* XXXKSE: */
FIX_SSTEP(FIRST_THREAD_IN_PROC(p));
#endif
setrunnable(FIRST_THREAD_IN_PROC(p)); /* XXXKSE */
/* XXXKSE: */
setrunnable(FIRST_THREAD_IN_PROC(p));
mtx_unlock_spin(&sched_lock);
} else {
mtx_unlock_spin(&sched_lock);

View File

@ -37,6 +37,7 @@
* @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
*
* From:
* $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
* $FreeBSD$
*/
@ -63,6 +64,7 @@ int
procfs_doprocstatus(PFS_FILL_ARGS)
{
struct session *sess;
struct thread *tdfirst;
struct tty *tp;
struct ucred *cr;
char *pc;
@ -124,14 +126,13 @@ procfs_doprocstatus(PFS_FILL_ARGS)
sbuf_printf(sb, " -1,-1 -1,-1 -1,-1");
}
if (p->p_flag & P_KSES) {
if (p->p_flag & P_KSES)
sbuf_printf(sb, " %s", "-kse- ");
} else {
struct thread *td;
td = FIRST_THREAD_IN_PROC(p);
else {
tdfirst = FIRST_THREAD_IN_PROC(p); /* XXX diff from td? */
sbuf_printf(sb, " %s",
(td->td_wchan && td->td_wmesg) ?
td->td_wmesg : "nochan");
(tdfirst->td_wchan && tdfirst->td_wmesg) ?
tdfirst->td_wmesg : "nochan");
}
cr = p->p_ucred;