|
StuBS
|
#include <interrupt/gatequeue.h>
Public Member Functions | |
| bool | enqueue (Gate *item) |
| Enqueues the provided item at the end of the queue. | |
| Gate * | dequeue () |
| Removes the first element in the queue and returns it. | |
Queue for Gates.
While for OOStuBS a simple linked list is sufficient (by having a head pointer in this calls and extending Gate with a next pointer), for multi-core systems like MPStuBS it needs to be able to enqueue the same Gate item on each Core (up to Core::MAX) at the same time (a multi-queue, requiring a head pointer array member in this class and a next pointer array in Gate).
| bool GateQueue::enqueue | ( | Gate * | item | ) |
Enqueues the provided item at the end of the queue.
In MPStuBS the item is added to the internal queue belonging to the core it is currently executed on.
| item | Queue element to be appended. |
| Gate * GateQueue::dequeue | ( | ) |
Removes the first element in the queue and returns it.
In MPStuBS the item is retrieved from the internal queue belonging to the core it is currently executed on.