* Deallocate a thread. */
| 751 | * Deallocate a thread. |
| 752 | */ |
| 753 | static void |
| 754 | thread_free_batched(struct thread *td) |
| 755 | { |
| 756 | |
| 757 | lock_profile_thread_exit(td); |
| 758 | if (td->td_cpuset) |
| 759 | cpuset_rel(td->td_cpuset); |
| 760 | td->td_cpuset = NULL; |
| 761 | cpu_thread_free(td); |
| 762 | if (td->td_kstack != 0) |
| 763 | vm_thread_dispose(td); |
| 764 | callout_drain(&td->td_slpcallout); |
| 765 | /* |
| 766 | * Freeing handled by the caller. |
| 767 | */ |
| 768 | td->td_tid = -1; |
| 769 | uma_zfree(thread_zone, td); |
| 770 | } |
| 771 | |
| 772 | void |
| 773 | thread_free(struct thread *td) |
no test coverage detected