/* * A priority_table is a simple implementation of a priority queue for entries with priorities that * are small non-negative integer values. It implements the obvious priority queue operations of * enqueuing an entry and dequeuing an entry with the maximum priority. It also supports removing * an arbitrary entry. The priority of an entry already in the table can be changed by removing it * and re-enqueuing it with a different priority. All operations have O(1) complexity. * * The links for the table entries must be embedded in the entries themselves. Lists are used to * link entries in the table and no wrapper type is declared, so an existing list entry in an * object can also be used to queue it in a priority_table, assuming the field is not used for * anything else while so queued. * * The table is implemented as an array of queues (circular lists) indexed by priority, along with * a hint for which queues are non-empty. Steven Skiena calls a very similar structure a "bounded * height priority queue", but given the resemblance to a hash table, "priority table" seems both * shorter and more apt, if somewhat novel.
*/
struct priority_table;
int __must_check vdo_make_priority_table(unsignedint max_priority, struct priority_table **table_ptr);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.