diff options
Diffstat (limited to 'lf_fifo.h')
-rw-r--r-- | lf_fifo.h | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -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 } |