37 #define CHAIN_ELEMENT_LOCK(instance) DPUTIL_LOCK(instance->lock) 38 #define CHAIN_ELEMENT_UNLOCK DPUTIL_UNLOCK 49 memcpy(&element->data, element_data,
sizeof(element->data));
58 ChainElement element = calloc(1,
sizeof(*element) + (is_threadsafe *
sizeof(pthread_mutex_t)));
64 element->
lock = (pthread_mutex_t *)(element + 1);
65 pthread_mutex_init(element->
lock, NULL);
90 if(part->data.func == func) {
114 if((part->data.func) && (part->data.func(arg, part->data.ctx) ==
CoR_RETURN)) {
#define CHAIN_ELEMENT_LOCK(instance)
ChainElementPart tail
list of ChainElementPart
void dputil_list_pull(DPUtilList this, DPUtilListData data)
list pull
ChainElementPart result_element_part
void chain_element_remove_function(ChainElement this, chain_func func)
void(* free)(EventInstance this)
void chain_element_delete(ChainElement this)
ChainElement chain_element_new(int is_threadsafe)
chain_element_data_t data
struct chain_element_part * ChainElementPart
int chain_element_add_function(ChainElement this, chain_element_req_t *elemnt_data)
#define CHAIN_ELEMENT_UNLOCK
void chain_element_call(ChainElement this, void *arg)
cor_result_e(* chain_func)(void *arg, void *ctx)
chain func
static ChainElementPart chain_element_part_new(chain_element_data_t *element_data)
new ChainElementPart
DPUtilListData dputil_list_pop(DPUtilList this)
list pop
void dputil_list_push(DPUtilList this, DPUtilListData data)
list push
This is API for element of chain.
chain function element part class instance definition
chain_element_data_t element_data
void chain_element_remove_element_part(ChainElement this, ChainElementPart element)
static void chain_element_part_free(ChainElementPart this)
free ChainElementPart