b8b4da05f44a66ca44445a50e3a2081f85969f36
1 // SPDX-FileCopyrightText: 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 // SPDX-License-Identifier: LGPL-2.1-or-later
7 #include "common/events.h"
8 #include "common/jhash.h"
11 * Needed by comm layer.
13 struct lttng_enum
*lttng_ust_enum_get_from_desc(struct lttng_ust_session
*session
,
14 const struct lttng_ust_enum_desc
*enum_desc
)
16 struct lttng_enum
*_enum
;
17 struct cds_hlist_head
*head
;
18 struct cds_hlist_node
*node
;
19 size_t name_len
= strlen(enum_desc
->name
);
22 hash
= jhash(enum_desc
->name
, name_len
, 0);
23 head
= &session
->priv
->enums_ht
.table
[hash
& (LTTNG_UST_ENUM_HT_SIZE
- 1)];
24 cds_hlist_for_each_entry(_enum
, node
, head
, hlist
) {
26 if (_enum
->desc
== enum_desc
)
This page took 0.031935 seconds and 5 git commands to generate.