| 241 | |
| 242 | |
| 243 | void h2_proxy_iq_add(h2_proxy_iqueue *q, int sid, h2_proxy_iq_cmp *cmp, void *ctx) |
| 244 | { |
| 245 | int i; |
| 246 | |
| 247 | if (q->nelts >= q->nalloc) { |
| 248 | iq_grow(q, q->nalloc * 2); |
| 249 | } |
| 250 | |
| 251 | i = (q->head + q->nelts) % q->nalloc; |
| 252 | q->elts[i] = sid; |
| 253 | ++q->nelts; |
| 254 | |
| 255 | if (cmp) { |
| 256 | /* bubble it to the front of the queue */ |
| 257 | iq_bubble_up(q, i, q->head, cmp, ctx); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | int h2_proxy_iq_remove(h2_proxy_iqueue *q, int sid) |
| 262 | { |
no test coverage detected