|
dpkg 1.22.7-3-g89f48
|
Data Structures | |
| struct | pkg_queue |
Macros | |
| #define | PKG_QUEUE_INIT { .head = NULL, .tail = NULL, .length = 0 } |
| Constant initializer for a package queue. | |
| #define | PKG_QUEUE_OBJECT (struct pkg_queue)PKG_QUEUE_INIT |
| Compound literal for a package queue. | |
Functions | |
| void | pkg_queue_init (struct pkg_queue *queue) |
| Initialize a package queue. | |
| void | pkg_queue_destroy (struct pkg_queue *queue) |
| Destroy a package queue. | |
| int | pkg_queue_is_empty (struct pkg_queue *queue) |
| Check if a package queue is empty. | |
| struct pkg_list * | pkg_queue_push (struct pkg_queue *queue, struct pkginfo *pkg) |
| Push a new node containing pkginfo to the tail of the queue. | |
| struct pkginfo * | pkg_queue_pop (struct pkg_queue *queue) |
| Pop a node containing pkginfo from the head of the queue. | |
Constant initializer for a package queue.
| #define PKG_QUEUE_OBJECT (struct pkg_queue)PKG_QUEUE_INIT |
Compound literal for a package queue.
| void pkg_queue_destroy | ( | struct pkg_queue * | queue | ) |
Destroy a package queue.
It frees the contained package list and resets the queue members.
| queue | The queue to destroy. |
References pkg_queue::head, pkg_list_free(), and pkg_queue_init().
| void pkg_queue_init | ( | struct pkg_queue * | queue | ) |
Initialize a package queue.
| queue | The queue to initialize. |
References pkg_queue::head, pkg_queue::length, and pkg_queue::tail.
Referenced by pkg_queue_destroy().
| int pkg_queue_is_empty | ( | struct pkg_queue * | queue | ) |
Check if a package queue is empty.
| queue | The queue to check. |
References pkg_queue::head.
Referenced by pkg_queue_pop(), process_archive(), process_queue(), and trigproc_run_deferred().
Pop a node containing pkginfo from the head of the queue.
This removes and frees the node from the queue, effectively reducing its size.
| queue | The queue to remove from. |
References pkg_queue::head, pkg_queue::length, pkg_list::next, pkg_list::pkg, pkg_queue_is_empty(), and pkg_queue::tail.
Referenced by process_archive(), process_queue(), and trigproc_run_deferred().
Push a new node containing pkginfo to the tail of the queue.
| queue | The queue to insert to. |
| pkg | The package to use fo the new node. |
References pkg_queue::head, pkg_queue::length, pkg_list::next, pkg_list::pkg, pkg_list_new(), and pkg_queue::tail.
Referenced by enqueue_conflictor(), and enqueue_package().