Fix a couple of style bugs introduced (or touched by) previous commit.
This commit is contained in:
parent
2d008b444d
commit
2b8a08af6b
@ -417,7 +417,6 @@ fork1(td, flags, procp)
|
||||
LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash);
|
||||
sx_xunlock(&allproc_lock);
|
||||
|
||||
|
||||
/*
|
||||
* Make a proc table entry for the new process.
|
||||
* Start by zeroing the section of proc that is zero-initialized,
|
||||
|
@ -81,7 +81,8 @@ kthread_create(void (*func)(void *), void *arg,
|
||||
if (!proc0.p_stats /* || proc0.p_stats->p_start.tv_sec == 0 */)
|
||||
panic("kthread_create called too soon");
|
||||
|
||||
error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, &p2);
|
||||
error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags,
|
||||
&p2);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
@ -151,6 +151,7 @@ kse_link(struct kse *ke, struct ksegrp *kg)
|
||||
static void
|
||||
ksegrp_link(struct ksegrp *kg, struct proc *p)
|
||||
{
|
||||
|
||||
TAILQ_INIT(&kg->kg_threads);
|
||||
TAILQ_INIT(&kg->kg_runq); /* links with td_runq */
|
||||
TAILQ_INIT(&kg->kg_slpq); /* links with td_runq */
|
||||
@ -173,6 +174,7 @@ void
|
||||
proc_linkup(struct proc *p, struct ksegrp *kg,
|
||||
struct kse *ke, struct thread *td)
|
||||
{
|
||||
|
||||
TAILQ_INIT(&p->p_ksegrps); /* all ksegrps in proc */
|
||||
TAILQ_INIT(&p->p_threads); /* all threads in proc */
|
||||
|
||||
|
@ -2333,14 +2333,12 @@ ttyinfo(tp)
|
||||
else {
|
||||
mtx_lock_spin(&sched_lock);
|
||||
|
||||
|
||||
/* Pick interesting process. */
|
||||
for (pick = NULL; p != 0; p = LIST_NEXT(p, p_pglist))
|
||||
if (proc_compare(pick, p))
|
||||
pick = p;
|
||||
|
||||
td = FIRST_THREAD_IN_PROC(pick);
|
||||
|
||||
stmp = pick->p_stat == SRUN ? "running" : /* XXXKSE */
|
||||
td->td_wmesg ? td->td_wmesg : "iowait";
|
||||
calcru(pick, &utime, &stime, NULL);
|
||||
|
@ -2560,8 +2560,7 @@ vfs_unmountall()
|
||||
if (curthread != NULL)
|
||||
td = curthread;
|
||||
else
|
||||
/* XXX XXX should this be proc0? */
|
||||
td = FIRST_THREAD_IN_PROC(initproc);
|
||||
td = FIRST_THREAD_IN_PROC(initproc); /* XXX XXX proc0? */
|
||||
/*
|
||||
* Since this only runs when rebooting, it is not interlocked.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user