| 155 | } |
| 156 | |
| 157 | int |
| 158 | stack_save_td(struct stack *st, struct thread *td) |
| 159 | { |
| 160 | uintptr_t pc, sp; |
| 161 | |
| 162 | THREAD_LOCK_ASSERT(td, MA_OWNED); |
| 163 | KASSERT(!TD_IS_SWAPPED(td), |
| 164 | ("stack_save_td: thread %p is swapped", td)); |
| 165 | |
| 166 | if (TD_IS_RUNNING(td)) |
| 167 | return (EOPNOTSUPP); |
| 168 | |
| 169 | pc = td->td_pcb->pcb_context[PCB_REG_RA]; |
| 170 | sp = td->td_pcb->pcb_context[PCB_REG_SP]; |
| 171 | stack_capture(st, td, pc, sp); |
| 172 | return (0); |
| 173 | } |
| 174 | |
| 175 | void |
| 176 | stack_save(struct stack *st) |
nothing calls this directly
no test coverage detected