enum lfds711_queue_query

From liblfds.org
Jump to navigation Jump to search

Source File

└───liblfds711
    └───inc
        └───liblfds711
                lfds711_queue_bounded_singleproducer_singleconsumer.h

Enum

enum lfds711_queue_bss_query
{
  LFDS711_QUEUE_BSS_QUERY_GET_POTENTIALLY_INACCURATE_COUNT,
  LFDS711_QUEUE_BSS_QUERY_VALIDATE
};

Values

LFDS711_QUEUE_BSS_QUERY_GET_POTENTIALLY_INACCURATE_COUNT

Counts the number of elements in the queue. This query, as with all operations on this queue, is not guaranteed to be accurate, which is to say, enqueue and dequeue operations which have returned to their calling thread may not yet be visible, which would lead the count to be inaccurate.

LFDS711_QUEUE_BSS_QUERY_BSS_VALIDATE

Validates the queue. In fact, for this queue, where the backing store is an array, there is no validation, other than if the user provides as input a lfds711_misc_validation_info, which indicates an expected range of the number of elements in the stack, in which case this query counts the number of elements in the queue and checks they fall within the expected range. As LFDS711_QUEUE_BSS_QUERY_GET_COUNT is used to perform the count, the usual caveats aboout operations not yet being visible apply.

Notes

This enum is used by the bounded, single producer, single consumer queue query function, lfds711_queue_bss_query.

See Also