| 436 | } while (0) |
| 437 | |
| 438 | void |
| 439 | _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE) |
| 440 | { |
| 441 | struct epoch_record *er; |
| 442 | struct thread *td; |
| 443 | |
| 444 | MPASS(cold || epoch != NULL); |
| 445 | MPASS(epoch->e_flags & EPOCH_PREEMPT); |
| 446 | td = curthread; |
| 447 | MPASS((vm_offset_t)et >= td->td_kstack && |
| 448 | (vm_offset_t)et + sizeof(struct epoch_tracker) <= |
| 449 | td->td_kstack + td->td_kstack_pages * PAGE_SIZE); |
| 450 | |
| 451 | INIT_CHECK(epoch); |
| 452 | #ifdef EPOCH_TRACE |
| 453 | epoch_trace_enter(td, epoch, et, file, line); |
| 454 | #endif |
| 455 | et->et_td = td; |
| 456 | THREAD_NO_SLEEPING(); |
| 457 | critical_enter(); |
| 458 | sched_pin(); |
| 459 | td->td_pre_epoch_prio = td->td_priority; |
| 460 | er = epoch_currecord(epoch); |
| 461 | /* Record-level tracking is reserved for non-preemptible epochs. */ |
| 462 | MPASS(er->er_td == NULL); |
| 463 | TAILQ_INSERT_TAIL(&er->er_tdlist, et, et_link); |
| 464 | ck_epoch_begin(&er->er_record, &et->et_section); |
| 465 | critical_exit(); |
| 466 | } |
| 467 | |
| 468 | void |
| 469 | epoch_enter(epoch_t epoch) |
nothing calls this directly
no test coverage detected