| 146 | } |
| 147 | |
| 148 | void |
| 149 | swi_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 | } |
nothing calls this directly
no test coverage detected