| 2024 | } |
| 2025 | |
| 2026 | void |
| 2027 | spinlock_exit(void) |
| 2028 | { |
| 2029 | struct thread *td; |
| 2030 | register_t flags; |
| 2031 | |
| 2032 | td = curthread; |
| 2033 | flags = td->td_md.md_saved_flags; |
| 2034 | td->td_md.md_spinlock_count--; |
| 2035 | if (td->td_md.md_spinlock_count == 0) { |
| 2036 | critical_exit(); |
| 2037 | intr_restore(flags); |
| 2038 | } |
| 2039 | } |
| 2040 | |
| 2041 | /* |
| 2042 | * Construct a PCB from a trapframe. This is called from kdb_trap() where |
no test coverage detected