Lines Matching defs:listp

905 	struct tcptimerlist *listp = &tcp_timer_list;
911 lck_mtx_lock(listp->mtx);
915 lck_mtx_unlock(listp->mtx);
919 if (listp->next_te != NULL && listp->next_te == &tp->tentry)
920 listp->next_te = LIST_NEXT(&tp->tentry, le);
925 listp->entries--;
929 lck_mtx_unlock(listp->mtx);
939 struct tcptimerlist *listp = &tcp_timer_list;
950 if (listp->running) {
954 diff = timer_diff(listp->runtime, 0, runtime, 0);
960 if (diff <= listp->fast_quantum)
963 if (diff <= listp->slow_quantum)
975 struct tcptimerlist *listp = &tcp_timer_list;
977 lck_mtx_assert(listp->mtx, LCK_MTX_ASSERT_OWNED);
979 listp->runtime = tcp_now + offset;
984 thread_call_enter_delayed(listp->call, deadline);
1107 struct tcptimerlist *listp = &tcp_timer_list;
1117 lck_mtx_lock(listp->mtx);
1119 listp->running = TRUE;
1121 LIST_FOREACH_SAFE(te, &listp->lhead, le, next_te) {
1146 listp->entries--;
1158 listp->next_te = next_te;
1163 lck_mtx_unlock(listp->mtx);
1168 lck_mtx_lock(listp->mtx);
1170 next_te = listp->next_te;
1171 listp->next_te = NULL;
1187 if (!LIST_EMPTY(&listp->lhead)) {
1188 if (listp->mode == TCP_TIMERLIST_FASTMODE) {
1190 listp->pref_mode == TCP_TIMERLIST_FASTMODE) {
1191 listp->idlegen = 0;
1193 listp->idlegen++;
1194 if (listp->idlegen > timer_fastmode_idlemax) {
1196 listp->idlegen = 0;
1206 listp->pref_mode == TCP_TIMERLIST_FASTMODE) {
1207 next_timer = listp->fast_quantum;
1209 if (listp->pref_offset != 0 &&
1210 listp->pref_offset < next_timer)
1211 next_timer = listp->pref_offset;
1212 if (next_timer < listp->slow_quantum)
1213 next_timer = listp->slow_quantum;
1216 listp->mode = mode;
1221 listp->runtime = 0;
1224 listp->running = FALSE;
1225 listp->pref_mode = 0;
1226 listp->pref_offset = 0;
1228 lck_mtx_unlock(listp->mtx);
1237 struct tcptimerlist *listp = &tcp_timer_list;
1262 offset = listp->fast_quantum;
1266 lck_mtx_lock(listp->mtx);
1270 LIST_INSERT_HEAD(&listp->lhead, te, le);
1273 listp->entries++;
1274 if (listp->entries > listp->maxentries)
1275 listp->maxentries = listp->entries;
1278 if (listp->runtime == 0)
1289 lck_mtx_lock(listp->mtx);
1296 if (listp->running) {
1298 listp->pref_mode = TCP_TIMERLIST_FASTMODE;
1299 } else if (listp->pref_offset == 0 ||
1300 ((int)offset) < listp->pref_offset) {
1301 listp->pref_offset = offset;
1305 diff = timer_diff(listp->runtime, 0, tcp_now, offset);
1318 listp->mode = TCP_TIMERLIST_FASTMODE;
1319 listp->idlegen = 0;
1325 lck_mtx_unlock(listp->mtx);