2 #define LFDS710_STACK_GET_KEY_FROM_ELEMENT( stack_element ) ( (stack_element).key )
3 #define LFDS710_STACK_SET_KEY_IN_ELEMENT( stack_element, new_key ) ( (stack_element).key = (void *) (lfds710_pal_uint_t) (new_key) )
4 #define LFDS710_STACK_GET_VALUE_FROM_ELEMENT( stack_element ) ( (stack_element).value )
5 #define LFDS710_STACK_SET_VALUE_IN_ELEMENT( stack_element, new_value ) ( (stack_element).value = (void *) (lfds710_pal_uint_t) (new_value) )
6 #define LFDS710_STACK_GET_USER_STATE_FROM_STATE( stack_state ) ( (stack_state).user_state )
9 enum lfds710_stack_query
11 LFDS710_STACK_QUERY_SINGLETHREADED_GET_COUNT,
12 LFDS710_STACK_QUERY_SINGLETHREADED_VALIDATE
15 /***** structures *****/
16 struct lfds710_stack_element
18 struct lfds710_stack_element
26 struct lfds710_stack_state
28 struct lfds710_stack_element LFDS710_PAL_ALIGN(LFDS710_PAL_ATOMIC_ISOLATION_IN_BYTES)
29 *volatile top[PAC_SIZE];
31 void LFDS710_PAL_ALIGN(LFDS710_PAL_ATOMIC_ISOLATION_IN_BYTES)
34 struct lfds710_misc_backoff_state
39 /***** public prototypes *****/
40 void lfds710_stack_init_valid_on_current_logical_core( struct lfds710_stack_state *ss,
42 // TRD : used in conjunction with the #define LFDS710_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE
44 void lfds710_stack_cleanup( struct lfds710_stack_state *ss,
45 void (*element_cleanup_callback)(struct lfds710_stack_state *ss, struct lfds710_stack_element *se) );
47 void lfds710_stack_push( struct lfds710_stack_state *ss,
48 struct lfds710_stack_element *se );
50 int lfds710_stack_pop( struct lfds710_stack_state *ss,
51 struct lfds710_stack_element **se );
53 void lfds710_stack_query( struct lfds710_stack_state *ss,
54 enum lfds710_stack_query query_type,