Lines Matching refs:queue
30 void nghttp2_queue_init(nghttp2_queue *queue) { in nghttp2_queue_init() argument
31 queue->front = queue->back = NULL; in nghttp2_queue_init()
34 void nghttp2_queue_free(nghttp2_queue *queue) { in nghttp2_queue_free() argument
35 if (!queue) { in nghttp2_queue_free()
38 nghttp2_queue_cell *p = queue->front; in nghttp2_queue_free()
47 int nghttp2_queue_push(nghttp2_queue *queue, void *data) { in nghttp2_queue_push() argument
55 if (queue->back) { in nghttp2_queue_push()
56 queue->back->next = new_cell; in nghttp2_queue_push()
57 queue->back = new_cell; in nghttp2_queue_push()
60 queue->front = queue->back = new_cell; in nghttp2_queue_push()
65 void nghttp2_queue_pop(nghttp2_queue *queue) { in nghttp2_queue_pop() argument
66 nghttp2_queue_cell *front = queue->front; in nghttp2_queue_pop()
68 queue->front = front->next; in nghttp2_queue_pop()
69 if (front == queue->back) { in nghttp2_queue_pop()
70 queue->back = NULL; in nghttp2_queue_pop()
75 void *nghttp2_queue_front(nghttp2_queue *queue) { in nghttp2_queue_front() argument
76 assert(queue->front); in nghttp2_queue_front()
77 return queue->front->data; in nghttp2_queue_front()
80 void *nghttp2_queue_back(nghttp2_queue *queue) { in nghttp2_queue_back() argument
81 assert(queue->back); in nghttp2_queue_back()
82 return queue->back->data; in nghttp2_queue_back()
85 int nghttp2_queue_empty(nghttp2_queue *queue) { return queue->front == NULL; } in nghttp2_queue_empty() argument