33 #ifndef LWIP_HDR_APPS_SNMP_THREADSYNC_H 34 #define LWIP_HDR_APPS_SNMP_THREADSYNC_H 47 typedef void (*snmp_threadsync_called_fn)(
void* arg);
48 typedef void (*snmp_threadsync_synchronizer_fn)(snmp_threadsync_called_fn fn,
void* arg);
52 struct threadsync_data
59 const u32_t *root_oid;
66 const struct snmp_threadsync_node *threadsync_node;
67 struct snmp_node_instance proxy_instance;
71 struct snmp_threadsync_instance
75 snmp_threadsync_synchronizer_fn sync_fn;
76 struct threadsync_data data;
80 struct snmp_threadsync_node
83 struct snmp_leaf_node node;
85 const struct snmp_leaf_node *target;
86 struct snmp_threadsync_instance *instance;
89 snmp_err_t snmp_threadsync_get_instance(
const u32_t *root_oid,
u8_t root_oid_len,
struct snmp_node_instance* instance);
90 snmp_err_t snmp_threadsync_get_next_instance(
const u32_t *root_oid,
u8_t root_oid_len,
struct snmp_node_instance* instance);
92 #define SNMP_CREATE_THREAD_SYNC_NODE(oid, target_leaf_node, threadsync_instance) \ 93 {{{ SNMP_NODE_THREADSYNC, (oid) }, \ 94 snmp_threadsync_get_instance, \ 95 snmp_threadsync_get_next_instance }, \ 97 (threadsync_instance) } 99 void snmp_threadsync_init(
struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn);
osSemaphoreId sys_mutex_t