LTTNG_ASSERT(node);
LTTNG_ASSERT(_key);
- DIAGNOSTIC_PUSH
- DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
- event = caa_container_of(node, lttng::sessiond::ust::registry_event, _node.node);
- DIAGNOSTIC_POP
-
- LTTNG_ASSERT(event);
+ event = lttng::utils::container_of(node, <tng::sessiond::ust::registry_event::_node);
key = (lttng::sessiond::ust::registry_event *) _key;
/* It has to be a perfect match. First, compare the event names. */
* are matched using the event name and signature.
*/
nptr = cds_lfht_add_unique(_events->ht, _events->hash_fct(event.get(), lttng_ht_seed),
- _events->match_fct, event.get(), &event->_node.node);
- if (nptr != &event->_node.node) {
+ _events->match_fct, event.get(), &event->_node);
+ if (nptr != &event->_node) {
if (buffer_type == LTTNG_BUFFER_PER_UID) {
/*
* This is normal, we just have to send the event id of the
* returned node.
*/
- DIAGNOSTIC_PUSH
- DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
- const auto existing_event = caa_container_of(
- nptr, lttng::sessiond::ust::registry_event, _node.node);
- DIAGNOSTIC_POP
+ const auto existing_event = lttng::utils::container_of(
+ nptr, <tng::sessiond::ust::registry_event::_node);
event_id = existing_event->id;
} else {
LTTNG_THROW_INVALID_ARGUMENT_ERROR(fmt::format(
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
- cds_lfht_for_each_entry(_events->ht, &iter.iter, event, _node.node) {
+ cds_lfht_for_each_entry(_events->ht, &iter.iter, event, _node) {
sorted_event_classes.emplace_back(event);
}
DIAGNOSTIC_POP
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
cds_lfht_for_each_entry(
- chan->_events->ht, &iter.iter, event, _node.node) {
+ chan->_events->ht, &iter.iter, event, _node) {
/* Delete the node from the ht and free it. */
ust_registry_channel_destroy_event(chan, event);
}
DBG("UST registry reply with enum %s with id %" PRIu64 " in sess_objd: %u",
enum_name, reg_enum->id, session_objd);
*enum_id = reg_enum->id;
-}
\ No newline at end of file
+}
*/
static void ust_registry_event_destroy_rcu(struct rcu_head *head)
{
- struct lttng_ht_node_u64 *node = lttng::utils::container_of(head, <tng_ht_node_u64::head);
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
lttng::sessiond::ust::registry_event *event =
- lttng::utils::container_of(node, <tng::sessiond::ust::registry_event::_node);
+ lttng::utils::container_of(head, <tng::sessiond::ust::registry_event::_head);
DIAGNOSTIC_POP
lttng::sessiond::ust::registry_event_destroy(event);
ASSERT_RCU_READ_LOCKED();
/* Delete the node first. */
- iter.iter.node = &event->_node.node;
+ iter.iter.node = &event->_node;
ret = lttng_ht_del(chan->_events, &iter);
LTTNG_ASSERT(!ret);
- call_rcu(&event->_node.head, ust_registry_event_destroy_rcu);
+ call_rcu(&event->_head, ust_registry_event_destroy_rcu);
return;
}