9eaa1c535e783897f0ed0ce90bf806b89f7e5e30
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #ifndef _LTT_SESSION_H
20 #define _LTT_SESSION_H
22 #include <lttng/lttng.h>
23 #include <urcu/list.h>
26 * Tracing session list
28 * Statically declared in session.c and can be accessed by using
29 * get_session_list() function that returns the pointer to the list.
31 struct ltt_session_list
{
33 * This lock protects any read/write access to the list and count (which is
34 * basically the list size). All public functions in session.c acquire this
35 * lock and release it before returning. If none of those functions are
36 * used, the lock MUST be acquired in order to iterate or/and do any
37 * actions on that list.
41 * Number of element in the list.
44 struct cds_list_head head
;
48 * This data structure contains information needed to identify a tracing
49 * session for both LTTng and UST.
54 struct ltt_kernel_session
*kernel_session
;
55 struct cds_list_head ust_traces
;
56 unsigned int ust_trace_count
;
58 * Protect any read/write on this session data structure. This lock must be
59 * acquired *before* using any public functions declared below. Use
60 * lock_session() and unlock_session() for that.
63 struct cds_list_head list
;
67 int create_session(char *name
, char *path
);
68 int destroy_session(char *name
);
69 void get_lttng_session(struct lttng_session
*sessions
);
70 void lock_session(struct ltt_session
*session
);
71 void unlock_session(struct ltt_session
*session
);
72 struct ltt_session
*find_session_by_name(char *name
);
73 unsigned int get_session_count(void);
74 struct ltt_session_list
*get_session_list(void);
76 #endif /* _LTT_SESSION_H */
This page took 0.033316 seconds and 5 git commands to generate.