Is there a library for C that provides priority queues?

Is there a library for C that provides priority queues? I'm interested in the open source libraries that are usually installed on Linux machines, something like glib, which provides some data structures.

+6
source share
2 answers

Some random link:

Edit:

In general, the books on Linux Kernel and Linux System Programming contain valuable material related to queues and their implementation details.

+4
source

Perhaps you can just use message queues, depending on how important the queues are.

In the case of posix message queues (see man mq_overview ), you can prioritize messages.

Alternatively, with System V message queues ( msgget() , msgsnd() , msgrcv() ), you can use the message type as a priority and try to get each priority (type) in the sequence from the highest priority to the lowest.

In any case, they are standard IPCs and should be available on any regular Linux distribution.

+2
source

Source: https://habr.com/ru/post/903975/


All Articles