Add generic intrusive FIFO queue

We need several FIFO queues (a queue of packets, a queue of messages,
etc.).

Some of them are implemented using cbuf, a generic circular buffer. But
for recording, we need to store the packets in an unbounded queue until
they are written, so the queue was implemented manually.

Create a generic implementation (using macros) to avoid reimplementing
it every time.
This commit is contained in:
Romain Vimont
2019-08-01 22:53:02 +02:00
parent 26213f1031
commit 53b6ee2cf4
3 changed files with 115 additions and 0 deletions

View File

@@ -150,6 +150,9 @@ tests = [
'tests/test_device_msg_deserialize.c',
'src/device_msg.c'
]],
['test_queue', [
'tests/test_queue.c',
]],
['test_strutil', [
'tests/test_strutil.c',
'src/str_util.c'