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

Function swi_handler

freebsd/arm/arm/syscall.c:148–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void
149swi_handler(struct trapframe *frame)
150{
151 struct thread *td = curthread;
152
153 td->td_frame = frame;
154
155 td->td_pticks = 0;
156
157 /*
158 * Enable interrupts if they were enabled before the exception.
159 * Since all syscalls *should* come from user mode it will always
160 * be safe to enable them, but check anyway.
161 */
162 if (td->td_md.md_spinlock_count == 0) {
163 if (__predict_true(frame->tf_spsr & PSR_I) == 0)
164 enable_interrupts(PSR_I);
165 if (__predict_true(frame->tf_spsr & PSR_F) == 0)
166 enable_interrupts(PSR_F);
167 }
168
169 syscall(td, frame);
170}

Callers

nothing calls this directly

Calls 2

enable_interruptsFunction · 0.85
syscallFunction · 0.70

Tested by

no test coverage detected