| 506 | } |
| 507 | |
| 508 | void |
| 509 | spinlock_enter(void) |
| 510 | { |
| 511 | struct thread *td; |
| 512 | register_t intr; |
| 513 | |
| 514 | td = curthread; |
| 515 | if (td->td_md.md_spinlock_count == 0) { |
| 516 | intr = intr_disable(); |
| 517 | td->td_md.md_spinlock_count = 1; |
| 518 | td->td_md.md_saved_intr = intr; |
| 519 | critical_enter(); |
| 520 | } else |
| 521 | td->td_md.md_spinlock_count++; |
| 522 | } |
| 523 | |
| 524 | void |
| 525 | spinlock_exit(void) |
nothing calls this directly
no test coverage detected