| 751 | } |
| 752 | |
| 753 | void |
| 754 | epoch_call(epoch_t epoch, epoch_callback_t callback, epoch_context_t ctx) |
| 755 | { |
| 756 | epoch_record_t er; |
| 757 | ck_epoch_entry_t *cb; |
| 758 | |
| 759 | cb = (void *)ctx; |
| 760 | |
| 761 | MPASS(callback); |
| 762 | /* too early in boot to have epoch set up */ |
| 763 | if (__predict_false(epoch == NULL)) |
| 764 | goto boottime; |
| 765 | #if !defined(EARLY_AP_STARTUP) |
| 766 | if (__predict_false(inited < 2)) |
| 767 | goto boottime; |
| 768 | #endif |
| 769 | |
| 770 | critical_enter(); |
| 771 | *DPCPU_PTR(epoch_cb_count) += 1; |
| 772 | er = epoch_currecord(epoch); |
| 773 | ck_epoch_call(&er->er_record, cb, (ck_epoch_cb_t *)callback); |
| 774 | critical_exit(); |
| 775 | return; |
| 776 | boottime: |
| 777 | callback(ctx); |
| 778 | } |
| 779 | |
| 780 | static void |
| 781 | epoch_call_task(void *arg __unused) |
no test coverage detected