07f1d9f03522d22553d11350444acc9754bb3a8f
2 * Copyright (C) 2013 - Julien Desfossez <jdesfossez@efficios.com>
3 * David Goulet <dgoulet@efficios.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License, version 2 only, as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 * Lookup a session within the given hash table and session id. RCU read side
23 * lock MUST be acquired before calling this and as long as the caller has a
24 * reference to the object.
26 * Return session or NULL if not found.
28 struct relay_session
*session_find_by_id(struct lttng_ht
*ht
, uint64_t id
)
30 struct relay_session
*session
= NULL
;
31 struct lttng_ht_node_ulong
*node
;
32 struct lttng_ht_iter iter
;
36 lttng_ht_lookup(ht
, (void *)((unsigned long) id
), &iter
);
37 node
= lttng_ht_iter_get_node_ulong(&iter
);
41 session
= caa_container_of(node
, struct relay_session
, session_n
);
This page took 0.031117 seconds and 4 git commands to generate.