X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.cpp;fp=src%2Fbin%2Flttng-sessiond%2Fcmd.cpp;h=07898138ad479fa493546ac45a176d80373a05a0;hp=aea78167160be7abc349758af1ad776d45b3c988;hb=f149493493fbd8a3efa4748832c03278c96c38ca;hpb=2d7da3031c65c4569ff2428a7c2cad30007f3b50;ds=sidebyside diff --git a/src/bin/lttng-sessiond/cmd.cpp b/src/bin/lttng-sessiond/cmd.cpp index aea781671..07898138a 100644 --- a/src/bin/lttng-sessiond/cmd.cpp +++ b/src/bin/lttng-sessiond/cmd.cpp @@ -74,6 +74,9 @@ /* Sleep for 100ms between each check for the shm path's deletion. */ #define SESSION_DESTROY_SHM_PATH_CHECK_DELAY_US 100000 +static enum lttng_error_code wait_on_path(void *path); + +namespace { struct cmd_destroy_session_reply_context { int reply_sock_fd; bool implicit_rotation_on_destroy; @@ -84,15 +87,13 @@ struct cmd_destroy_session_reply_context { enum lttng_error_code destruction_status; }; -static enum lttng_error_code wait_on_path(void *path); - /* * Command completion handler that is used by the destroy command * when a session that has a non-default shm_path is being destroyed. * * See comment in cmd_destroy_session() for the rationale. */ -static struct destroy_completion_handler { +struct destroy_completion_handler { struct cmd_completion_handler handler; char shm_path[member_sizeof(struct ltt_session, shm_path)]; } destroy_completion_handler = { @@ -103,17 +104,17 @@ static struct destroy_completion_handler { .shm_path = { 0 }, }; -static struct cmd_completion_handler *current_completion_handler; - /* * Used to keep a unique index for each relayd socket created where this value * is associated with streams on the consumer so it can match the right relayd * to send to. It must be accessed with the relayd_net_seq_idx_lock * held. */ -static pthread_mutex_t relayd_net_seq_idx_lock = PTHREAD_MUTEX_INITIALIZER; -static uint64_t relayd_net_seq_idx; +pthread_mutex_t relayd_net_seq_idx_lock = PTHREAD_MUTEX_INITIALIZER; +uint64_t relayd_net_seq_idx; +} /* namespace */ +static struct cmd_completion_handler *current_completion_handler; static int validate_ust_event_name(const char *); static int cmd_enable_event_internal(struct ltt_session *session, const struct lttng_domain *domain,