| 736 | } |
| 737 | |
| 738 | int |
| 739 | thread_alloc_stack(struct thread *td, int pages) |
| 740 | { |
| 741 | |
| 742 | KASSERT(td->td_kstack == 0, |
| 743 | ("thread_alloc_stack called on a thread with kstack")); |
| 744 | if (!vm_thread_new(td, pages)) |
| 745 | return (0); |
| 746 | cpu_thread_alloc(td); |
| 747 | return (1); |
| 748 | } |
| 749 | |
| 750 | /* |
| 751 | * Deallocate a thread. |
no test coverage detected