Lines Matching refs:pq
95 pqueue_s *pq = (pqueue_s *) OPENSSL_malloc(sizeof(pqueue_s)); in pqueue_new() local
96 if (pq == NULL) return NULL; in pqueue_new()
98 memset(pq, 0x00, sizeof(pqueue_s)); in pqueue_new()
99 return pq; in pqueue_new()
103 pqueue_free(pqueue_s *pq) in pqueue_free() argument
105 if (pq == NULL) return; in pqueue_free()
107 OPENSSL_free(pq); in pqueue_free()
111 pqueue_insert(pqueue_s *pq, pitem *item) in pqueue_insert() argument
115 if (pq->items == NULL) in pqueue_insert()
117 pq->items = item; in pqueue_insert()
121 for(curr = NULL, next = pq->items; in pqueue_insert()
133 pq->items = item; in pqueue_insert()
151 pqueue_peek(pqueue_s *pq) in pqueue_peek() argument
153 return pq->items; in pqueue_peek()
157 pqueue_pop(pqueue_s *pq) in pqueue_pop() argument
159 pitem *item = pq->items; in pqueue_pop()
161 if (pq->items != NULL) in pqueue_pop()
162 pq->items = pq->items->next; in pqueue_pop()
168 pqueue_find(pqueue_s *pq, unsigned char *prio64be) in pqueue_find() argument
173 if ( pq->items == NULL) in pqueue_find()
176 for ( next = pq->items; next->next != NULL; next = next->next) in pqueue_find()
194 pq->items = next->next; in pqueue_find()
203 pqueue_print(pqueue_s *pq) in pqueue_print() argument
205 pitem *item = pq->items; in pqueue_print()
219 pqueue_iterator(pqueue_s *pq) in pqueue_iterator() argument
221 return pqueue_peek(pq); in pqueue_iterator()
241 pqueue_size(pqueue_s *pq) in pqueue_size() argument
243 pitem *item = pq->items; in pqueue_size()