summaryrefslogtreecommitdiffstats
path: root/lf_fifo.h
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2009-11-07 23:54:32 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2009-11-07 23:54:32 +0100
commit491770df273ac2628c98a559fe8bbed5e812fbed (patch)
tree4148d84a0b900aa754cd8ee686f46e153335caf6 /lf_fifo.h
parent604f2f86cff27b2368239f42a119bda6f244b9ee (diff)
downloadlock_free-491770df273ac2628c98a559fe8bbed5e812fbed.zip
lock_free-491770df273ac2628c98a559fe8bbed5e812fbed.tar.gz
lf_fifo don't use union anymore, just for one ==
Diffstat (limited to 'lf_fifo.h')
-rw-r--r--lf_fifo.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/lf_fifo.h b/lf_fifo.h
index dc3e87d..cfecee1 100644
--- a/lf_fifo.h
+++ b/lf_fifo.h
@@ -25,6 +25,7 @@
*
*/
+#include "lf_cas.h"
#ifndef _LF_FIFO_H_
#define _LF_FIFO_H_
@@ -33,27 +34,19 @@
extern "C" {
# endif /* __cplusplus */
-typedef union pointer {
- struct split {
- volatile union pointer *next;
- volatile unsigned int count;
- } split;
- volatile unsigned long long concat;
-} pointer_t;
-
typedef struct queue {
- pointer_t head;
- pointer_t tail;
+ lf_pointer_t head;
+ lf_pointer_t tail;
} lf_fifo_t;
/* initialize an empty lf_fifo structure */
void lf_fifo_init( lf_fifo_t *q );
/* push a node at the tail of q */
-void lf_fifo_push( lf_fifo_t *q, pointer_t *node );
+void lf_fifo_push( lf_fifo_t *q, lf_pointer_t *node );
/* pop a node from the head of q */
-pointer_t* pop( lf_fifo_t *q );
+lf_pointer_t* pop( lf_fifo_t *q );
# ifdef __cplusplus
}