Lines Matching refs:obs
126 const struct zbus_observer *obs, k_timepoint_t end_time, in _zbus_notify_observer() argument
129 switch (obs->type) { in _zbus_notify_observer()
131 obs->callback(chan); in _zbus_notify_observer()
135 return k_msgq_put(obs->queue, &chan, sys_timepoint_timeout(end_time)); in _zbus_notify_observer()
145 k_fifo_put(obs->message_fifo, cloned_buf); in _zbus_notify_observer()
193 const struct zbus_observer *obs = observation->obs; in _zbus_vded_exec() local
195 if (!obs->data->enabled || observation_mask->enabled) { in _zbus_vded_exec()
199 err = _zbus_notify_observer(chan, obs, end_time, buf); in _zbus_vded_exec()
204 _ZBUS_OBS_NAME(obs), err); in _zbus_vded_exec()
213 LOG_DBG(" %d -> %s", index++, _ZBUS_OBS_NAME(obs)); in _zbus_vded_exec()
221 const struct zbus_observer *obs = obs_nd->obs; in _zbus_vded_exec() local
223 if (!obs->data->enabled) { in _zbus_vded_exec()
227 err = _zbus_notify_observer(chan, obs, end_time, buf); in _zbus_vded_exec()
258 const struct zbus_observer *obs = observation->obs; in chan_update_hop() local
260 if (!obs->data->enabled || observation_mask->enabled) { in chan_update_hop()
264 if (chan_highest_observer_priority > obs->data->priority) { in chan_update_hop()
265 chan_highest_observer_priority = obs->data->priority; in chan_update_hop()
272 static inline void update_all_channels_hop(const struct zbus_observer *obs) in update_all_channels_hop() argument
275 if (obs != observation->obs) { in update_all_channels_hop()
283 int zbus_obs_attach_to_thread(const struct zbus_observer *obs) in zbus_obs_attach_to_thread() argument
286 _ZBUS_ASSERT(obs != NULL, "obs is required"); in zbus_obs_attach_to_thread()
291 if (obs->data->priority != current_thread_priority) { in zbus_obs_attach_to_thread()
292 obs->data->priority = current_thread_priority; in zbus_obs_attach_to_thread()
294 update_all_channels_hop(obs); in zbus_obs_attach_to_thread()
301 int zbus_obs_detach_from_thread(const struct zbus_observer *obs) in zbus_obs_detach_from_thread() argument
304 _ZBUS_ASSERT(obs != NULL, "obs is required"); in zbus_obs_detach_from_thread()
307 obs->data->priority = ZBUS_MIN_THREAD_PRIORITY; in zbus_obs_detach_from_thread()
309 update_all_channels_hop(obs); in zbus_obs_detach_from_thread()
317 static inline void update_all_channels_hop(const struct zbus_observer *obs) in update_all_channels_hop() argument
530 int zbus_obs_set_chan_notification_mask(const struct zbus_observer *obs, in zbus_obs_set_chan_notification_mask() argument
533 _ZBUS_ASSERT(obs != NULL, "obs is required"); in zbus_obs_set_chan_notification_mask()
550 if (observation->obs == obs) { in zbus_obs_set_chan_notification_mask()
554 update_all_channels_hop(obs); in zbus_obs_set_chan_notification_mask()
567 int zbus_obs_is_chan_notification_masked(const struct zbus_observer *obs, in zbus_obs_is_chan_notification_masked() argument
570 _ZBUS_ASSERT(obs != NULL, "obs is required"); in zbus_obs_is_chan_notification_masked()
587 if (observation->obs == obs) { in zbus_obs_is_chan_notification_masked()
600 int zbus_obs_set_enable(const struct zbus_observer *obs, bool enabled) in zbus_obs_set_enable() argument
602 _ZBUS_ASSERT(obs != NULL, "obs is required"); in zbus_obs_set_enable()
605 if (obs->data->enabled != enabled) { in zbus_obs_set_enable()
606 obs->data->enabled = enabled; in zbus_obs_set_enable()
608 update_all_channels_hop(obs); in zbus_obs_set_enable()