On 4/12/21 5:19 PM, Gaetan Rivet wrote:
> Add a lockless multi-producer/multi-consumer, array-based,
> non-intrusive, bounded queue that will fail on overflow.
> 
> Each operation (enqueue, dequeue) uses a CAS(). As such, both producer
> and consumer sides guarantee lock-free forward progress. If the queue
> is full, enqueuing will fail.  Conversely, if the queue is empty,
> dequeueing will fail.
> 
> The bound of the queue are restricted to power-of-twos, to allow simpler
> overflow on unsigned position markers.
> 
> Signed-off-by: Gaetan Rivet <[email protected]>
> Reviewed-by: Eli Britstein <[email protected]>
> ---
>  lib/automake.mk |   2 +
>  lib/llring.c    | 153 ++++++++++++++++++++++++++++++++++++++++++++++++
>  lib/llring.h    |  76 ++++++++++++++++++++++++
>  3 files changed, 231 insertions(+)
>  create mode 100644 lib/llring.c
>  create mode 100644 lib/llring.h
> 

Reviewed-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to