Lines Matching refs:queue

28 // Creates a new fixed queue with the given |capacity|. If more elements than
29 // |capacity| are added to the queue, the caller is blocked until space is
30 // made available in the queue. Returns NULL on failure. The caller must free
31 // the returned queue with |fixed_queue_free|.
34 // Freeing a queue that is currently in use (i.e. has waiters
36 void fixed_queue_free(fixed_queue_t *queue, fixed_queue_free_cb free_cb);
38 // Enqueues the given |data| into the |queue|. The caller will be blocked
39 // if nore more space is available in the queue. Neither |queue| nor |data|
41 void fixed_queue_enqueue(fixed_queue_t *queue, void *data);
43 // Dequeues the next element from |queue|. If the queue is currently empty,
45 // function will never return NULL. |queue| may not be NULL.
46 void *fixed_queue_dequeue(fixed_queue_t *queue);
48 // Tries to enqueue |data| into the |queue|. This function will never block
49 // the caller. If the queue capacity would be exceeded by adding one more
51 // returns true. Neither |queue| nor |data| may be NULL.
52 bool fixed_queue_try_enqueue(fixed_queue_t *queue, void *data);
54 // Tries to dequeue an element from |queue|. This function will never block
55 // the caller. If the queue is empty, this function returns NULL immediately.
56 // Otherwise, the next element in the queue is returned. |queue| may not be
58 void *fixed_queue_try_dequeue(fixed_queue_t *queue);
63 // blocking. The caller must not close the returned file descriptor. |queue|
65 int fixed_queue_get_enqueue_fd(const fixed_queue_t *queue);
70 // blocking. The caller must not close the returned file descriptor. |queue|
72 int fixed_queue_get_dequeue_fd(const fixed_queue_t *queue);