/* fifo.h - ownership of the nodes maintained in the fifo is outside
 *          the fifo. Implementing only put and get
 */

#ifndef FIFO_H_
#define FIFO_H_

typedef struct Node{
	struct Node *next_ptr;
} node;


typedef struct {
	node *front; 	/* points to first object in the queue. */
	node *rear;	/* points to the last object in the queue. */
} fifo_t;

/* adds an element to the queue. */
void put (fifo_t *fifop, node * new_node);

/* removes and returns an element from the queue. */
node * get (fifo_t *fifop);

#endif
