mpsc_queue: Add module.

This is a simple multi-producer, single-consumer queue.  The intended use case
is in the HPA, as we begin supporting hpdatas that move between hpa_shards.  We
take just a single CAS as the cost to send a message (or a batch of messages) in
the low-contention case, and lock-freedom lets us avoid some lock-ordering
issues.
This commit is contained in:
David Goldblatt
2021-05-11 14:49:55 -07:00
committed by David Goldblatt
parent 4452a4812f
commit de033f56c0
3 changed files with 439 additions and 0 deletions

View File

@@ -233,6 +233,7 @@ TESTS_UNIT := \
$(srcroot)test/unit/malloc_conf_2.c \
$(srcroot)test/unit/malloc_io.c \
$(srcroot)test/unit/math.c \
$(srcroot)test/unit/mpsc_queue.c \
$(srcroot)test/unit/mq.c \
$(srcroot)test/unit/mtx.c \
$(srcroot)test/unit/nstime.c \