Lines Matching refs:listp

1074 	struct tcptimerlist *listp = &tcp_timer_list;
1080 lck_mtx_lock(listp->mtx);
1084 lck_mtx_unlock(listp->mtx);
1088 if (listp->next_te != NULL && listp->next_te == &tp->tentry)
1089 listp->next_te = LIST_NEXT(&tp->tentry, le);
1094 listp->entries--;
1098 lck_mtx_unlock(listp->mtx);
1108 struct tcptimerlist *listp = &tcp_timer_list;
1119 if (listp->running)
1122 if (!listp->scheduled)
1125 diff = timer_diff(listp->runtime, 0, runtime, 0);
1131 if (diff <= listp->fast_quantum)
1134 if (diff <= listp->slow_quantum)
1146 struct tcptimerlist *listp = &tcp_timer_list;
1148 lck_mtx_assert(listp->mtx, LCK_MTX_ASSERT_OWNED);
1151 listp->runtime = tcp_now + offset;
1152 if (listp->runtime == 0)
1153 listp->runtime++;
1158 thread_call_enter_delayed(listp->call, deadline);
1159 listp->scheduled = TRUE;
1284 struct tcptimerlist *listp = &tcp_timer_list;
1294 lck_mtx_lock(listp->mtx);
1296 listp->running = TRUE;
1298 LIST_FOREACH_SAFE(te, &listp->lhead, le, next_te) {
1323 listp->entries--;
1335 listp->next_te = next_te;
1340 lck_mtx_unlock(listp->mtx);
1345 lck_mtx_lock(listp->mtx);
1347 next_te = listp->next_te;
1348 listp->next_te = NULL;
1364 if (!LIST_EMPTY(&listp->lhead)) {
1365 if (listp->mode == TCP_TIMERLIST_FASTMODE) {
1367 listp->pref_mode == TCP_TIMERLIST_FASTMODE) {
1368 listp->idlegen = 0;
1370 listp->idlegen++;
1371 if (listp->idlegen > timer_fastmode_idlemax) {
1373 listp->idlegen = 0;
1383 listp->pref_mode == TCP_TIMERLIST_FASTMODE) {
1384 next_timer = listp->fast_quantum;
1386 if (listp->pref_offset != 0 &&
1387 listp->pref_offset < next_timer)
1388 next_timer = listp->pref_offset;
1389 if (next_timer < listp->slow_quantum)
1390 next_timer = listp->slow_quantum;
1393 listp->mode = mode;
1404 listp->running = FALSE;
1405 listp->pref_mode = 0;
1406 listp->pref_offset = 0;
1408 lck_mtx_unlock(listp->mtx);
1417 struct tcptimerlist *listp = &tcp_timer_list;
1442 offset = listp->fast_quantum;
1446 lck_mtx_lock(listp->mtx);
1450 LIST_INSERT_HEAD(&listp->lhead, te, le);
1453 listp->entries++;
1454 if (listp->entries > listp->maxentries)
1455 listp->maxentries = listp->entries;
1458 if (!listp->scheduled)
1469 lck_mtx_lock(listp->mtx);
1476 if (listp->running) {
1478 listp->pref_mode = TCP_TIMERLIST_FASTMODE;
1479 } else if (listp->pref_offset == 0 ||
1480 offset < listp->pref_offset) {
1481 listp->pref_offset = offset;
1488 if (listp->scheduled) {
1490 diff = timer_diff(listp->runtime, 0,
1505 listp->mode = TCP_TIMERLIST_FASTMODE;
1506 listp->idlegen = 0;
1512 lck_mtx_unlock(listp->mtx);