Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_epoch.c
Show First 20 Lines • Show All 823 Lines • ▼ Show 20 Lines | #endif | ||||
while (epoch->e_drain_count != 0) | while (epoch->e_drain_count != 0) | ||||
msleep(epoch, &epoch->e_drain_mtx, PZERO, "EDRAIN", 0); | msleep(epoch, &epoch->e_drain_mtx, PZERO, "EDRAIN", 0); | ||||
mtx_unlock(&epoch->e_drain_mtx); | mtx_unlock(&epoch->e_drain_mtx); | ||||
sx_xunlock(&epoch->e_drain_sx); | sx_xunlock(&epoch->e_drain_sx); | ||||
PICKUP_GIANT(); | PICKUP_GIANT(); | ||||
} | } | ||||
void | |||||
epoch_thread_init(struct thread *td) | |||||
{ | |||||
td->td_et = malloc(sizeof(struct epoch_tracker), M_EPOCH, M_WAITOK); | |||||
} | |||||
void | |||||
epoch_thread_fini(struct thread *td) | |||||
{ | |||||
free(td->td_et, M_EPOCH); | |||||
} |