NUM_OF_HPTSI_SLOTS
for (i = 0, t = hpts_slot(hpts->p_cur_slot, 1); i < NUM_OF_HPTSI_SLOTS; i++) {
t = (t + 1) % NUM_OF_HPTSI_SLOTS;
KASSERT((i != NUM_OF_HPTSI_SLOTS), ("Hpts:%p cnt:%d but none found", hpts, hpts->p_on_queue_cnt));
((NUM_OF_HPTSI_SLOTS-1) * HPTS_USECS_PER_SLOT))) {
slots_to_run = NUM_OF_HPTSI_SLOTS - 1;
if (hpts->p_runningslot >= NUM_OF_HPTSI_SLOTS) {
asz = sizeof(struct hptsh) * NUM_OF_HPTSI_SLOTS;
for (j = 0; j < NUM_OF_HPTSI_SLOTS; j++) {
#define HPTS_MAX_SLEEP_ALLOWED (NUM_OF_HPTSI_SLOTS/2)
KASSERT(wheel_slot < NUM_OF_HPTSI_SLOTS, ("Invalid slot %u not on wheel", wheel_slot));
return ((wheel_slot + plus) % NUM_OF_HPTSI_SLOTS);
return ((cts / HPTS_USECS_PER_SLOT) % NUM_OF_HPTSI_SLOTS);
return (NUM_OF_HPTSI_SLOTS - 1);
return ((NUM_OF_HPTSI_SLOTS - prev_slot) + slot_now);
end_slot = NUM_OF_HPTSI_SLOTS - 1;
end_slot = NUM_OF_HPTSI_SLOTS - 1;
return (NUM_OF_HPTSI_SLOTS - dis_to_travel);
avail_on_wheel = NUM_OF_HPTSI_SLOTS - dis_to_travel;
KASSERT(hptsslot < NUM_OF_HPTSI_SLOTS,
uint32_t large_timeout_usecs = (NUM_OF_HPTSI_SLOTS + 5000) * HPTS_USECS_PER_SLOT; /* Beyond wheel capacity */
uint32_t huge_timeout_usecs = (NUM_OF_HPTSI_SLOTS * 3) * HPTS_USECS_PER_SLOT; /* 3x wheel capacity */
KTEST_VERIFY(tp->t_hpts_slot < NUM_OF_HPTSI_SLOTS);
test_time_usec += NUM_OF_HPTSI_SLOTS * HPTS_USECS_PER_SLOT;
KTEST_VERIFY(initial_request > NUM_OF_HPTSI_SLOTS);
test_time_usec += NUM_OF_HPTSI_SLOTS * HPTS_USECS_PER_SLOT;
test_time_usec += NUM_OF_HPTSI_SLOTS * HPTS_USECS_PER_SLOT;
KTEST_VERIFY(tp->t_hpts_slot < NUM_OF_HPTSI_SLOTS);
tcp_hpts_insert(pace, tp, (NUM_OF_HPTSI_SLOTS - 1) * HPTS_USECS_PER_SLOT, NULL);
KTEST_VERIFY(tp->t_hpts_slot < NUM_OF_HPTSI_SLOTS);
timeout_usecs = ((i * NUM_OF_HPTSI_SLOTS) / num_tcpcbs) * HPTS_USECS_PER_SLOT; /* Spread across slots */
test_time_usec += (NUM_OF_HPTSI_SLOTS + 5000) * HPTS_USECS_PER_SLOT;
KTEST_EQUAL(slots_ran, NUM_OF_HPTSI_SLOTS-1); /* Should process all slots */