typedef struct __fifo_elem_t { struct __fifo_t* prev; struct __fifo_t* next; } fifo_elem_t; typedef struct __fifo_t { fifo_elem_t* head; fifo_elem_t* tail; } fifo_t; /* * */ fifo_t* fifo_create( void ); /* * */ int fifo_push( fifo_t* fifo, fifo_elem_t* elem ); /* * */ fifo_elem_t* fifo_pop( fifo_t* fifo ); /* * */ int fifo_destroy( fifo_t** fifo );