1 /***** the library wide include file *****/
2 #include "lfds600_internal.h"
7 #define LFDS600_STACK_POINTER 0
8 #define LFDS600_STACK_COUNTER 1
9 #define LFDS600_STACK_PAC_SIZE 2
11 /***** structures *****/
12 #pragma pack( push, LFDS600_ALIGN_DOUBLE_POINTER )
14 struct lfds600_stack_state
16 // TRD : must come first for alignment
17 struct lfds600_stack_element
18 *volatile top[LFDS600_STACK_PAC_SIZE];
23 struct lfds600_freelist_state
27 struct lfds600_stack_element
29 struct lfds600_stack_element
30 *next[LFDS600_STACK_PAC_SIZE];
32 struct lfds600_freelist_element
41 /***** private prototypes *****/
42 int lfds600_stack_internal_freelist_init_function( void **user_data, void *user_state );
43 void lfds600_stack_internal_freelist_delete_function( void *user_data, void *user_state );
45 void lfds600_stack_internal_new_element_from_freelist( struct lfds600_stack_state *ss, struct lfds600_stack_element *se[LFDS600_STACK_PAC_SIZE], void *user_data );
46 void lfds600_stack_internal_new_element( struct lfds600_stack_state *ss, struct lfds600_stack_element *se[LFDS600_STACK_PAC_SIZE], void *user_data );
47 void lfds600_stack_internal_init_element( struct lfds600_stack_state *ss, struct lfds600_stack_element *se[LFDS600_STACK_PAC_SIZE], struct lfds600_freelist_element *fe, void *user_data );
49 void lfds600_stack_internal_push( struct lfds600_stack_state *ss, struct lfds600_stack_element *se[LFDS600_STACK_PAC_SIZE] );