Add liblttng-ctl destructor to cleanup memory
[lttng-tools.git] / src / bin / lttng-sessiond / lttng-sessiond.h
1 /*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18 #ifndef _LTT_SESSIOND_H
19 #define _LTT_SESSIOND_H
20
21 #define _LGPL_SOURCE
22 #include <urcu.h>
23 #include <urcu/wfqueue.h>
24
25 #include <common/sessiond-comm/sessiond-comm.h>
26 #include <common/compat/socket.h>
27
28 #include "session.h"
29 #include "ust-app.h"
30
31 extern const char default_home_dir[],
32 default_tracing_group[],
33 default_ust_sock_dir[],
34 default_global_apps_pipe[];
35
36 /* Set in main.c at boot time of the daemon */
37 extern int kernel_tracer_fd;
38
39 /*
40 * This contains extra data needed for processing a command received by the
41 * session daemon from the lttng client.
42 */
43 struct command_ctx {
44 int ust_sock;
45 unsigned int lttng_msg_size;
46 struct ltt_session *session;
47 struct lttcomm_lttng_msg *llm;
48 struct lttcomm_session_msg *lsm;
49 lttng_sock_cred creds;
50 };
51
52 struct ust_command {
53 int sock;
54 struct ust_register_msg reg_msg;
55 struct cds_wfq_node node;
56 };
57
58 /*
59 * Queue used to enqueue UST registration request (ust_commant) and protected
60 * by a futex with a scheme N wakers / 1 waiters. See futex.c/.h
61 */
62 struct ust_cmd_queue {
63 int32_t futex;
64 struct cds_wfq_queue queue;
65 };
66
67 #endif /* _LTT_SESSIOND_H */
This page took 0.030649 seconds and 4 git commands to generate.