Lines Matching defs:obj_core
8 #include <zephyr/kernel/obj_core.h>
25 void k_obj_core_init(struct k_obj_core *obj_core, struct k_obj_type *type)
27 obj_core->node.next = NULL;
28 obj_core->type = type;
30 obj_core->stats = NULL;
34 void k_obj_core_link(struct k_obj_core *obj_core)
38 sys_slist_append(&obj_core->type->list, &obj_core->node);
43 void k_obj_core_init_and_link(struct k_obj_core *obj_core,
46 k_obj_core_init(obj_core, type);
47 k_obj_core_link(obj_core);
50 void k_obj_core_unlink(struct k_obj_core *obj_core)
54 sys_slist_find_and_remove(&obj_core->type->list, &obj_core->node);
85 struct k_obj_core *obj_core;
92 obj_core = CONTAINER_OF(node, struct k_obj_core, node);
93 status = func(obj_core, data);
108 struct k_obj_core *obj_core;
114 obj_core = CONTAINER_OF(node, struct k_obj_core, node);
115 status = func(obj_core, data);
125 int k_obj_core_stats_register(struct k_obj_core *obj_core, void *stats,
131 if (obj_core->type->stats_desc == NULL) {
134 } else if (obj_core->type->stats_desc->raw_size != stats_len) {
138 obj_core->stats = stats;
147 int k_obj_core_stats_deregister(struct k_obj_core *obj_core)
152 if (obj_core->type->stats_desc == NULL) {
156 obj_core->stats = NULL;
165 int k_obj_core_stats_raw(struct k_obj_core *obj_core, void *stats,
173 desc = obj_core->type->stats_desc;
177 } else if ((desc->raw_size != stats_len) || (obj_core->stats == NULL)) {
184 rv = desc->raw(obj_core, stats);
192 int k_obj_core_stats_query(struct k_obj_core *obj_core, void *stats,
200 desc = obj_core->type->stats_desc;
204 } else if ((desc->query_size != stats_len) || (obj_core->stats == NULL)) {
211 rv = desc->query(obj_core, stats);
219 int k_obj_core_stats_reset(struct k_obj_core *obj_core)
226 desc = obj_core->type->stats_desc;
230 } else if (obj_core->stats == NULL) {
234 rv = desc->reset(obj_core);
242 int k_obj_core_stats_disable(struct k_obj_core *obj_core)
249 desc = obj_core->type->stats_desc;
253 } else if (obj_core->stats == NULL) {
257 rv = desc->disable(obj_core);
265 int k_obj_core_stats_enable(struct k_obj_core *obj_core)
272 desc = obj_core->type->stats_desc;
276 } else if (obj_core->stats == NULL) {
280 rv = desc->enable(obj_core);