This time REALLY copy the name from the proc to the thread as a default.
This commit is contained in:
parent
f86f9eeaef
commit
c67ddc21e7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173625
@ -1045,6 +1045,7 @@ thread_schedule_upcall(struct thread *td, struct kse_upcall *ku)
|
|||||||
__rangeof(struct thread, td_startcopy, td_endcopy));
|
__rangeof(struct thread, td_startcopy, td_endcopy));
|
||||||
sched_fork_thread(td, td2);
|
sched_fork_thread(td, td2);
|
||||||
thread_link(td2, ku->ku_proc);
|
thread_link(td2, ku->ku_proc);
|
||||||
|
bcopy(ku->ku_comm, td2->td_name, sizeof(td2->td_name));
|
||||||
/* inherit parts of blocked thread's context as a good template */
|
/* inherit parts of blocked thread's context as a good template */
|
||||||
cpu_set_upcall(td2, td);
|
cpu_set_upcall(td2, td);
|
||||||
/* Let the new thread become owner of the upcall */
|
/* Let the new thread become owner of the upcall */
|
||||||
|
@ -231,6 +231,7 @@ create_thread(struct thread *td, mcontext_t *ctx,
|
|||||||
newtd->td_sigmask = td->td_sigmask;
|
newtd->td_sigmask = td->td_sigmask;
|
||||||
PROC_SLOCK(p);
|
PROC_SLOCK(p);
|
||||||
thread_link(newtd, p);
|
thread_link(newtd, p);
|
||||||
|
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. */
|
||||||
sched_fork_thread(td, newtd);
|
sched_fork_thread(td, newtd);
|
||||||
|
@ -232,7 +232,6 @@ proc_linkup(struct proc *p, struct thread *td)
|
|||||||
/* XXX p_ksi may be null if ksiginfo zone is not ready */
|
/* XXX p_ksi may be null if ksiginfo zone is not ready */
|
||||||
p->p_ksi->ksi_flags = KSI_EXT | KSI_INS;
|
p->p_ksi->ksi_flags = KSI_EXT | KSI_INS;
|
||||||
}
|
}
|
||||||
bcopy(p->p_comm, td->td_name, sizeof(td->td_name));
|
|
||||||
LIST_INIT(&p->p_mqnotifier);
|
LIST_INIT(&p->p_mqnotifier);
|
||||||
p->p_numthreads = 0;
|
p->p_numthreads = 0;
|
||||||
thread_link(td, p);
|
thread_link(td, p);
|
||||||
|
Loading…
Reference in New Issue
Block a user