2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef NOTIFICATION_THREAD_INTERNAL_H
9 #define NOTIFICATION_THREAD_INTERNAL_H
11 #include <lttng/ref-internal.h>
12 #include <urcu/rculfhash.h>
17 enum lttng_domain_type domain
;
26 * Hashtable containing back-refs (weak) to all channels in this session.
27 * The hashtable's key is a hash of (struct channel_key) and
28 * the value is of type (struct channel_info *).
30 struct cds_lfht
*channel_infos_ht
;
31 struct lttng_session_trigger_list
*trigger_list
;
32 /* Node in the notification thread state's sessions_ht. */
33 struct cds_lfht_node sessions_ht_node
;
35 * Weak reference to the thread state's sessions_ht. Used for removal on
38 struct cds_lfht
*sessions_ht
;
39 uint64_t consumed_data_size
;
41 /* Whether a rotation is ongoing for this session. */
43 /* Identifier of the currently ongoing rotation. */
46 /* call_rcu delayed reclaim. */
47 struct rcu_head rcu_node
;
51 struct channel_key key
;
55 * A channel info holds a reference (lttng_ref) on session_info.
56 * session_info, in return, holds a weak reference to the channel.
58 struct session_info
*session_info
;
59 /* Node in the notification thread state's channels_ht. */
60 struct cds_lfht_node channels_ht_node
;
61 /* Node in the session_info's channels_ht. */
62 struct cds_lfht_node session_info_channels_ht_node
;
63 /* call_rcu delayed reclaim. */
64 struct rcu_head rcu_node
;
67 #endif /* NOTIFICATION_THREAD_INTERNAL_H */