Function pcqueue_timedpeek

Function Documentation

status_t pcqueue_timedpeek(struct pcqueue *const queue, const struct timespec *const to, void **const e)

Get the first element in the queue if it exists.

Note

The filled value returned by this function cannot be relied upon in a multi-threaded context without additional synchronization.

Parameters:
  • queue – The queue handle.

  • to – A RELATIVE timeout, NOT an ABSOLUTE timeout, as the POSIX standard specifies. This function converts the relative timeout to absolute timeout required.

  • e – To be filled with the address of the first element, if it exists, and set to NULL otherwise.

Returns:

status_t.