Lines Matching refs:instance

47   sys_mutex_lock(&call_data->threadsync_node->instance->sem_usage_mutex);  in call_synced_function()
48 call_data->threadsync_node->instance->sync_fn(fn, call_data); in call_synced_function()
49 sys_sem_wait(&call_data->threadsync_node->instance->sem); in call_synced_function()
50 sys_mutex_unlock(&call_data->threadsync_node->instance->sem_usage_mutex); in call_synced_function()
60 sys_sem_signal(&call_data->threadsync_node->instance->sem); in threadsync_get_value_synced()
64 threadsync_get_value(struct snmp_node_instance* instance, void* value) in threadsync_get_value() argument
66 struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; in threadsync_get_value()
81 sys_sem_signal(&call_data->threadsync_node->instance->sem); in threadsync_set_test_synced()
85 threadsync_set_test(struct snmp_node_instance* instance, u16_t len, void *value) in threadsync_set_test() argument
87 struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; in threadsync_set_test()
103 sys_sem_signal(&call_data->threadsync_node->instance->sem); in threadsync_set_value_synced()
107 threadsync_set_value(struct snmp_node_instance* instance, u16_t len, void *value) in threadsync_set_value() argument
109 struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; in threadsync_set_value()
125 sys_sem_signal(&call_data->threadsync_node->instance->sem); in threadsync_release_instance_synced()
129 threadsync_release_instance(struct snmp_node_instance *instance) in threadsync_release_instance() argument
131 struct threadsync_data *call_data = (struct threadsync_data*)instance->reference.ptr; in threadsync_release_instance()
146 sys_sem_signal(&call_data->threadsync_node->instance->sem); in get_instance_synced()
157 sys_sem_signal(&call_data->threadsync_node->instance->sem); in get_next_instance_synced()
161 do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance, snmp_threads… in do_sync() argument
163 …threadsync_node *threadsync_node = (const struct snmp_threadsync_node*)(const void*)instance->node; in do_sync()
164 struct threadsync_data *call_data = &threadsync_node->instance->data; in do_sync()
173 instance->reference.ptr = call_data; in do_sync()
174 …snmp_oid_assign(&call_data->proxy_instance.instance_oid, instance->instance_oid.id, instance->inst… in do_sync()
184 instance->access = call_data->proxy_instance.access; in do_sync()
185 instance->asn1_type = call_data->proxy_instance.asn1_type; in do_sync()
186 instance->release_instance = threadsync_release_instance; in do_sync()
187instance->get_value = (call_data->proxy_instance.get_value != NULL)? threadsync_get_value :… in do_sync()
188instance->set_value = (call_data->proxy_instance.set_value != NULL)? threadsync_set_value :… in do_sync()
189instance->set_test = (call_data->proxy_instance.set_test != NULL)? threadsync_set_test :… in do_sync()
190 …snmp_oid_assign(&instance->instance_oid, call_data->proxy_instance.instance_oid.id, call_data->pro… in do_sync()
197 …eadsync_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) in snmp_threadsync_get_instance() argument
199 return do_sync(root_oid, root_oid_len, instance, get_instance_synced); in snmp_threadsync_get_instance()
203 …nc_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance) in snmp_threadsync_get_next_instance() argument
205 return do_sync(root_oid, root_oid_len, instance, get_next_instance_synced); in snmp_threadsync_get_next_instance()
209 void snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_f… in snmp_threadsync_init() argument
211 err_t err = sys_mutex_new(&instance->sem_usage_mutex); in snmp_threadsync_init()
213 err = sys_sem_new(&instance->sem, 0); in snmp_threadsync_init()
216 instance->sync_fn = sync_fn; in snmp_threadsync_init()