| 487 | } |
| 488 | |
| 489 | void |
| 490 | _epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE) |
| 491 | { |
| 492 | struct epoch_record *er; |
| 493 | struct thread *td; |
| 494 | |
| 495 | INIT_CHECK(epoch); |
| 496 | td = curthread; |
| 497 | critical_enter(); |
| 498 | sched_unpin(); |
| 499 | THREAD_SLEEPING_OK(); |
| 500 | er = epoch_currecord(epoch); |
| 501 | MPASS(epoch->e_flags & EPOCH_PREEMPT); |
| 502 | MPASS(et != NULL); |
| 503 | MPASS(et->et_td == td); |
| 504 | #ifdef INVARIANTS |
| 505 | et->et_td = (void*)0xDEADBEEF; |
| 506 | /* Record-level tracking is reserved for non-preemptible epochs. */ |
| 507 | MPASS(er->er_td == NULL); |
| 508 | #endif |
| 509 | ck_epoch_end(&er->er_record, &et->et_section); |
| 510 | TAILQ_REMOVE(&er->er_tdlist, et, et_link); |
| 511 | er->er_gen++; |
| 512 | if (__predict_false(td->td_pre_epoch_prio != td->td_priority)) |
| 513 | epoch_adjust_prio(td, td->td_pre_epoch_prio); |
| 514 | critical_exit(); |
| 515 | #ifdef EPOCH_TRACE |
| 516 | epoch_trace_exit(td, epoch, et, file, line); |
| 517 | #endif |
| 518 | } |
| 519 | |
| 520 | void |
| 521 | epoch_exit(epoch_t epoch) |
nothing calls this directly
no test coverage detected