2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 * Copyright (C) 2013 - Raphaƫl Beamonte <raphael.beamonte@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2 only,
7 * as published by the Free Software Foundation.
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 along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef _LTT_SESSIOND_H
20 #define _LTT_SESSIOND_H
24 #include <urcu/wfqueue.h>
26 #include <common/sessiond-comm/sessiond-comm.h>
27 #include <common/compat/poll.h>
28 #include <common/compat/socket.h>
34 extern const char default_home_dir
[],
35 default_tracing_group
[],
36 default_ust_sock_dir
[],
37 default_global_apps_pipe
[];
39 /* Set in main.c at boot time of the daemon */
40 extern int kernel_tracer_fd
;
43 * This contains extra data needed for processing a command received by the
44 * session daemon from the lttng client.
48 unsigned int lttng_msg_size
;
49 struct ltt_session
*session
;
50 struct lttcomm_lttng_msg
*llm
;
51 struct lttcomm_session_msg
*lsm
;
52 lttng_sock_cred creds
;
57 struct ust_register_msg reg_msg
;
58 struct cds_wfq_node node
;
62 * Queue used to enqueue UST registration request (ust_commant) and protected
63 * by a futex with a scheme N wakers / 1 waiters. See futex.c/.h
65 struct ust_cmd_queue
{
67 struct cds_wfq_queue queue
;
71 * This is the wait queue containing wait nodes during the application
72 * registration process.
74 struct ust_reg_wait_queue
{
76 struct cds_list_head head
;
80 * Use by the dispatch registration to queue UST command socket to wait for the
83 struct ust_reg_wait_node
{
85 struct cds_list_head head
;
89 * This pipe is used to inform the thread managing application notify
90 * communication that a command is queued and ready to be processed.
92 extern int apps_cmd_notify_pipe
[2];
95 * Used to notify that a hash table needs to be destroyed by dedicated
96 * thread. Required by design because we don't want to move destroy
97 * paths outside of large RCU read-side lock paths, and destroy cannot
98 * be called by call_rcu thread, because it may hang (waiting for
99 * call_rcu completion).
101 extern int ht_cleanup_pipe
[2];
104 * Populated when the daemon starts with the current page size of the system.
106 extern long page_size
;
109 * Global set once in main(). JUL TCP port for registration.
111 extern unsigned int jul_tcp_port
;
114 * Section name to look for in the daemon configuration file.
116 extern const char * const config_section_name
;
118 /* Is this daemon root or not. */
121 int sessiond_set_thread_pollset(struct lttng_poll_event
*events
, size_t size
);
122 int sessiond_check_thread_quit_pipe(int fd
, uint32_t events
);
124 void *thread_ht_cleanup(void *data
);
126 void sessiond_notify_ready(void);
128 #endif /* _LTT_SESSIOND_H */
This page took 0.033401 seconds and 5 git commands to generate.