Lines Matching refs:n

99 static void list_remove(QUIC_CFQ_ITEM_LIST *l, QUIC_CFQ_ITEM_EX *n)  in list_remove()  argument
101 if (l->head == n) in list_remove()
102 l->head = n->next; in list_remove()
103 if (l->tail == n) in list_remove()
104 l->tail = n->prev; in list_remove()
105 if (n->prev != NULL) in list_remove()
106 n->prev->next = n->next; in list_remove()
107 if (n->next != NULL) in list_remove()
108 n->next->prev = n->prev; in list_remove()
109 n->prev = n->next = NULL; in list_remove()
112 static void list_insert_head(QUIC_CFQ_ITEM_LIST *l, QUIC_CFQ_ITEM_EX *n) in list_insert_head() argument
114 n->next = l->head; in list_insert_head()
115 n->prev = NULL; in list_insert_head()
116 l->head = n; in list_insert_head()
117 if (n->next != NULL) in list_insert_head()
118 n->next->prev = n; in list_insert_head()
120 l->tail = n; in list_insert_head()
123 static void list_insert_tail(QUIC_CFQ_ITEM_LIST *l, QUIC_CFQ_ITEM_EX *n) in list_insert_tail() argument
125 n->prev = l->tail; in list_insert_tail()
126 n->next = NULL; in list_insert_tail()
127 l->tail = n; in list_insert_tail()
128 if (n->prev != NULL) in list_insert_tail()
129 n->prev->next = n; in list_insert_tail()
131 l->head = n; in list_insert_tail()
136 QUIC_CFQ_ITEM_EX *n) in list_insert_after() argument
138 n->prev = ref; in list_insert_after()
139 n->next = ref->next; in list_insert_after()
141 ref->next->prev = n; in list_insert_after()
142 ref->next = n; in list_insert_after()
144 l->tail = n; in list_insert_after()
147 static void list_insert_sorted(QUIC_CFQ_ITEM_LIST *l, QUIC_CFQ_ITEM_EX *n, in list_insert_sorted() argument
154 l->head = l->tail = n; in list_insert_sorted()
155 n->prev = n->next = NULL; in list_insert_sorted()
159 for (; p != NULL && cmp(p, n) < 0; pprev = p, p = p->next); in list_insert_sorted()
162 list_insert_tail(l, n); in list_insert_sorted()
164 list_insert_head(l, n); in list_insert_sorted()
166 list_insert_after(l, pprev, n); in list_insert_sorted()