File queue_raw.h

Raw queue operations.

This is only used in special circumstances, as it does not alert the scheduler in any way.

Functions

Result queue_raw_put(Queue *queue, void const *item)

Puts an item into the queue without notifying the scheduler.

Warning

Not notifying the scheduler may result in coroutines that are blocked forever. This is only used for queues that are not used for inter coroutine communications.

Parameters:
  • queue – Queue to put the item into.

  • item – Item to put into the queue.

Return values:
  • RES_OK – Item has been queued.

  • RES_QUEUE_FULL – Queue is full, no item has been inserted.

Result queue_raw_get(Queue *queue, void *item)

Gets an item from the queue without notifying the scheduler.

Warning

Not notifying the scheduler may result in coroutines that are blocked forever. This is only used for queues that are not used for inter coroutine communications.

Parameters:
  • queue – Queue to get the item from.

  • item – Item to get from the queue, only valid if result was RES_OK.

Return values:
  • RES_OK – Item has been queued.

  • RES_QUEUE_FULL – Queue is full, no item has been inserted.