Consistently use p instead of td->td_proc in create_thread
No functional changes.
This commit is contained in:
parent
2d8bbd0b6d
commit
203322f966
@ -187,9 +187,9 @@ create_thread(struct thread *td, mcontext_t *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RACCT
|
#ifdef RACCT
|
||||||
PROC_LOCK(td->td_proc);
|
PROC_LOCK(p);
|
||||||
error = racct_add(p, RACCT_NTHR, 1);
|
error = racct_add(p, RACCT_NTHR, 1);
|
||||||
PROC_UNLOCK(td->td_proc);
|
PROC_UNLOCK(p);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
return (EPROCLIM);
|
return (EPROCLIM);
|
||||||
#endif
|
#endif
|
||||||
@ -250,9 +250,9 @@ create_thread(struct thread *td, mcontext_t *ctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PROC_LOCK(td->td_proc);
|
PROC_LOCK(p);
|
||||||
td->td_proc->p_flag |= P_HADTHREADS;
|
p->p_flag |= P_HADTHREADS;
|
||||||
thread_link(newtd, p);
|
thread_link(newtd, p);
|
||||||
bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name));
|
bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name));
|
||||||
thread_lock(td);
|
thread_lock(td);
|
||||||
/* let the scheduler know about these things. */
|
/* let the scheduler know about these things. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user