mcs-queue: a few changes
[model-checker-benchmarks.git] / mcs-queue / my_queue.h
index 80e695829d9954b6f4a81860ca26d6c48e75a5d4..3e3f435b43569eb843932f29122907f6be06967d 100644 (file)
@@ -1,3 +1,5 @@
+#include <stdatomic.h>
+
 #define TRUE                           1
 #define FALSE                          0
 
@@ -11,8 +13,8 @@ typedef union pointer {
                volatile unsigned short count;
                volatile unsigned short ptr;
        } sep;
-       volatile unsigned long con;
-}pointer_t;
+       atomic_ulong con;
+} pointer_t;
 
 typedef struct node {
        unsigned value;