Home | History | Annotate | Download | only in src

Lines Matching full:dispatcher

63 void data_dispatcher_free(data_dispatcher_t *dispatcher) {
64 if (!dispatcher)
67 hash_map_free(dispatcher->dispatch_table);
68 osi_free(dispatcher->name);
69 osi_free(dispatcher);
72 void data_dispatcher_register(data_dispatcher_t *dispatcher, data_dispatcher_type_t type, fixed_queue_t *queue) {
73 assert(dispatcher != NULL);
75 hash_map_erase(dispatcher->dispatch_table, (void *)type);
77 hash_map_set(dispatcher->dispatch_table, (void *)type, queue);
80 void data_dispatcher_register_default(data_dispatcher_t *dispatcher, fixed_queue_t *queue) {
81 assert(dispatcher != NULL);
83 dispatcher->default_queue = queue;
86 bool data_dispatcher_dispatch(data_dispatcher_t *dispatcher, data_dispatcher_type_t type, void *data) {
87 assert(dispatcher != NULL);
90 fixed_queue_t *queue = hash_map_get(dispatcher->dispatch_table, (void *)type);
92 queue = dispatcher->default_queue;
97 LOG_WARN(LOG_TAG, "%s has no handler for type (%zd) in data dispatcher named: %s", __func__, type, dispatcher->name);