X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng-ust-comm.h;h=d792074e3810eb5a0ed5e54428cdc4a10a27b4a7;hb=381c0f1ef474e0ae8a96b3753470ca4bda45c764;hp=6914cc2a4dbad8dd43dbcb1108fb383c21be56f9;hpb=b35d179d7be2ab0cb4a9c698b86d78928089fc39;p=lttng-ust.git diff --git a/include/lttng-ust-comm.h b/include/lttng-ust-comm.h index 6914cc2a..d792074e 100644 --- a/include/lttng-ust-comm.h +++ b/include/lttng-ust-comm.h @@ -30,6 +30,14 @@ #include #include +/* + * Default timeout the application waits for the sessiond to send its + * "register done" command. Can be overridden with the environment + * variable "UST_REGISTER_TIMEOUT". Note that if the sessiond is not + * found, the application proceeds directly without any delay. + */ +#define LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS 3000 + #define LTTNG_RUNDIR "/var/run/lttng" /* Default unix socket path */ @@ -38,6 +46,9 @@ #define DEFAULT_HOME_APPS_UNIX_SOCK "%s/.apps-ltt-sessiond" #define DEFAULT_HOME_CLIENT_UNIX_SOCK "%s/.client-ltt-sessiond" +#define DEFAULT_GLOBAL_APPS_WAIT_SHM_PATH "/lttng-ust-apps-wait" +#define DEFAULT_HOME_APPS_WAIT_SHM_PATH "/lttng-ust-apps-wait-%u" + /* Queue size of listen(2) */ #define MAX_LISTEN 10 @@ -46,36 +57,6 @@ */ #define LTTCOMM_ERR_INDEX(code) (code - LTTCOMM_OK) -enum lttcomm_ust_command { - UST_CREATE_SESSION, - UST_RELEASE_SESSION, - UST_VERSION, - UST_LIST_TRACEPOINTS, - UST_WAIT_QUIESCENT, - UST_CALIBRATE, - - /* Apply on session handle */ - UST_METADATA, /* release with UST_RELEASE_CHANNEL */ - UST_CHANNEL, - UST_RELEASE_CHANNEL, - UST_SESSION_START, - UST_SESSION_STOP, - - /* Apply on channel handle */ - UST_STREAM, - UST_RELEASE_STREAM, - UST_EVENT, - UST_RELEASE_EVENT, - - /* Apply on event and channel handle */ - UST_CONTEXT, - UST_RELEASE_CONTEXT, - - /* Apply on event, channel and session handle */ - UST_ENABLE, - UST_DISABLE, -}; - /* * lttcomm error code. */ @@ -140,11 +121,12 @@ enum lttcomm_return_code { * Data structure for the commands sent from sessiond to UST. */ struct lttcomm_ust_msg { - uint32_t cmd_type; /* enum lttcomm_ust_command */ uint32_t handle; + uint32_t cmd; union { struct lttng_ust_tracer_version version; struct lttng_ust_channel channel; + struct lttng_ust_stream stream; struct lttng_ust_event event; struct lttng_ust_context context; } u; @@ -155,10 +137,14 @@ struct lttcomm_ust_msg { * cmd_type is sent back in the reply for validation. */ struct lttcomm_ust_reply { - uint32_t cmd_type; /* enum lttcomm_sessiond_command */ + uint32_t handle; + uint32_t cmd; uint32_t ret_code; /* enum enum lttcomm_return_code */ uint32_t ret_val; /* return value */ union { + struct { + uint64_t memory_map_size; + } stream; } u; };