// *************** LLFIFO.H ********************* // Dynamically allocated linked list FIFO // initializes Heap and linked list FIFO // Last modified 1/16/02 by Jonathan W. Valvano // Copyright 2002 by Jonathan W. Valvano, valvano@uts.cc.utexas.edu // You may use, edit, run or distribute this file // as long as the above copyright notice remains void LLFifo_Init(void); // three steps occur // 1) creates a new linked list node (dynamic allocation), // 2) stores 16-bit data in node. // 3) links the node into the linked list FIFO // returns 0 if data can not be saved, because heap is empty // returns 1 if data was successfully saved int LLFifo_Put(unsigned short data) ; // three steps occur // 1) retrieves the data from the oldest linked list node, // 2) unlinks the node from the linked list FIFO // 3) releases the memory of the node (dynamic deallocation) // returns 0 if data can not be removed, because FIFO was empty // returns 1 if data was successfully removed int LLFifo_Get(unsigned short *datapt);