+
+/*
+ * Needed by comm layer.
+ */
+struct lttng_enum *lttng_ust_enum_get(struct lttng_session *session,
+ const char *enum_name)
+{
+ struct lttng_enum *_enum;
+ struct cds_hlist_head *head;
+ struct cds_hlist_node *node;
+ size_t name_len = strlen(enum_name);
+ uint32_t hash;
+
+ hash = jhash(enum_name, name_len, 0);
+ head = &session->enums_ht.table[hash & (LTTNG_UST_ENUM_HT_SIZE - 1)];
+ cds_hlist_for_each_entry(_enum, node, head, hlist) {
+ assert(_enum->desc);
+ if (!strncmp(_enum->desc->name, enum_name,
+ LTTNG_UST_SYM_NAME_LEN - 1))
+ return _enum;
+ }
+ return NULL;
+}