Merge branch '3-integrate-carla'
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef QUEUE_H
|
||||
#define QUEUE_H
|
||||
|
||||
#include <stdatomic.h>
|
||||
#include "command.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -15,8 +16,8 @@ typedef struct {
|
||||
command_t buffer[QUEUE_CAPACITY];
|
||||
/* head: index where next element will be written (producer only)
|
||||
* tail: index of next element to read (consumer only) */
|
||||
int head;
|
||||
int tail;
|
||||
atomic_int head;
|
||||
atomic_int tail;
|
||||
} spsc_queue_t;
|
||||
|
||||
/* Initialise queue (must be called once before any push/pop). */
|
||||
|
||||
Reference in New Issue
Block a user