mcs-queue: a few changes
authorBrian Norris <banorris@uci.edu>
Tue, 5 Mar 2013 18:10:22 +0000 (10:10 -0800)
committerBrian Norris <banorris@uci.edu>
Tue, 5 Mar 2013 18:10:22 +0000 (10:10 -0800)
mcs-queue/my_queue.h

index 80e6958..3e3f435 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;