Lines Matching refs:pq
95 pqueue_s *pq = (pqueue_s *)OPENSSL_malloc(sizeof(pqueue_s));
96 if (pq == NULL)
99 memset(pq, 0x00, sizeof(pqueue_s));
100 return pq;
103 void pqueue_free(pqueue_s *pq)
105 if (pq == NULL)
108 OPENSSL_free(pq);
111 pitem *pqueue_insert(pqueue_s *pq, pitem *item)
115 if (pq->items == NULL) {
116 pq->items = item;
120 for (curr = NULL, next = pq->items;
126 pq->items = item;
143 pitem *pqueue_peek(pqueue_s *pq)
145 return pq->items;
148 pitem *pqueue_pop(pqueue_s *pq)
150 pitem *item = pq->items;
152 if (pq->items != NULL)
153 pq->items = pq->items->next;
158 pitem *pqueue_find(pqueue_s *pq, PQ_64BIT priority)
163 if (pq->items == NULL)
166 for (next = pq->items; next->next != NULL; next = next->next) {
184 void pqueue_print(pqueue_s *pq)
186 pitem *item = pq->items;
195 pitem *pqueue_iterator(pqueue_s *pq)
197 return pqueue_peek(pq);
214 int pqueue_size(pqueue_s *pq)
216 pitem *item = pq->items;