MCPcopy Create free account
hub / github.com/F-Stack/f-stack / stack_save_td

Function stack_save_td

freebsd/mips/mips/stack_machdep.c:157–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157int
158stack_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
175void
176stack_save(struct stack *st)

Callers

nothing calls this directly

Calls 1

stack_captureFunction · 0.70

Tested by

no test coverage detected