Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_thread.c
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
* violated. Typically new fields are moved to the end of the | * violated. Typically new fields are moved to the end of the | ||||
* structures. | * structures. | ||||
*/ | */ | ||||
#ifdef __amd64__ | #ifdef __amd64__ | ||||
_Static_assert(offsetof(struct thread, td_flags) == 0xfc, | _Static_assert(offsetof(struct thread, td_flags) == 0xfc, | ||||
"struct thread KBI td_flags"); | "struct thread KBI td_flags"); | ||||
_Static_assert(offsetof(struct thread, td_pflags) == 0x104, | _Static_assert(offsetof(struct thread, td_pflags) == 0x104, | ||||
"struct thread KBI td_pflags"); | "struct thread KBI td_pflags"); | ||||
_Static_assert(offsetof(struct thread, td_frame) == 0x470, | _Static_assert(offsetof(struct thread, td_frame) == 0x478, | ||||
"struct thread KBI td_frame"); | "struct thread KBI td_frame"); | ||||
_Static_assert(offsetof(struct thread, td_emuldata) == 0x528, | _Static_assert(offsetof(struct thread, td_emuldata) == 0x530, | ||||
"struct thread KBI td_emuldata"); | "struct thread KBI td_emuldata"); | ||||
_Static_assert(offsetof(struct proc, p_flag) == 0xb0, | _Static_assert(offsetof(struct proc, p_flag) == 0xb0, | ||||
"struct proc KBI p_flag"); | "struct proc KBI p_flag"); | ||||
_Static_assert(offsetof(struct proc, p_pid) == 0xbc, | _Static_assert(offsetof(struct proc, p_pid) == 0xbc, | ||||
"struct proc KBI p_pid"); | "struct proc KBI p_pid"); | ||||
_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, | _Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, | ||||
"struct proc KBI p_filemon"); | "struct proc KBI p_filemon"); | ||||
_Static_assert(offsetof(struct proc, p_comm) == 0x3e8, | _Static_assert(offsetof(struct proc, p_comm) == 0x3e8, | ||||
▲ Show 20 Lines • Show All 437 Lines • ▼ Show 20 Lines | thread_exit(void) | ||||
CTR3(KTR_PROC, "thread_exit: thread %p (pid %ld, %s)", td, | CTR3(KTR_PROC, "thread_exit: thread %p (pid %ld, %s)", td, | ||||
(long)p->p_pid, td->td_name); | (long)p->p_pid, td->td_name); | ||||
SDT_PROBE0(proc, , , lwp__exit); | SDT_PROBE0(proc, , , lwp__exit); | ||||
KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending")); | KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending")); | ||||
/* | /* | ||||
* drop FPU & debug register state storage, or any other | * drop FPU & debug register state storage, or any other | ||||
* architecture specific resources that | * architecture specific resources that | ||||
* would not be on a new untouched process. | * would not be on a new untouched process. | ||||
mhorne063_gmail.com: You should remove this call. | |||||
*/ | */ | ||||
cpu_thread_exit(td); | cpu_thread_exit(td); | ||||
Not Done Inline ActionsThere is probably some issue with phabricator or patch. In this chunk, there is no diff. I suspect that it should be a call to kcov_thread_dtor ? kib: There is probably some issue with phabricator or patch. In this chunk, there is no diff. I… | |||||
Done Inline ActionsThere was previously a change here, and a comment above. I changed it to use the thread_dtor EVENTHANDLER. andrew: There was previously a change here, and a comment above. I changed it to use the `thread_dtor`… | |||||
/* | /* | ||||
* The last thread is left attached to the process | * The last thread is left attached to the process | ||||
* So that the whole bundle gets recycled. Skip | * So that the whole bundle gets recycled. Skip | ||||
* all this stuff if we never had threads. | * all this stuff if we never had threads. | ||||
* EXIT clears all sign of other threads when | * EXIT clears all sign of other threads when | ||||
* it goes to single threading, so the last thread always | * it goes to single threading, so the last thread always | ||||
* takes the short path. | * takes the short path. | ||||
▲ Show 20 Lines • Show All 716 Lines • Show Last 20 Lines |
You should remove this call.