DEFAULT_DATA_AVAILABILITY_WAIT_TIME is used by the lttng client to
wait on the destruction handle returned by a session destruction
command. This constant is in micro-seconds while the destruction
handle expects a timeout in ms.
This causes the client to appear unresponsive while waiting for
the destruction of a session.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
fflush(stdout);
}
- usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US);
_MSG(".");
fflush(stdout);
}
do {
status = lttng_destruction_handle_wait_for_completion(handle,
- DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US / USEC_PER_MSEC);
switch (status) {
case LTTNG_DESTRUCTION_HANDLE_STATUS_TIMEOUT:
if (!printed_wait_msg) {
}
if (rotation_state == LTTNG_ROTATION_STATE_ONGOING) {
- ret = usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ ret = usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US);
if (ret) {
PERROR("\nusleep");
goto error;
* returned value indicates availability.
*/
if (ret) {
- usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US);
_MSG(".");
fflush(stdout);
}
* Wait period before retrying the lttng_data_pending command in the lttng
* stop command of liblttng-ctl.
*/
-#define DEFAULT_DATA_AVAILABILITY_WAIT_TIME 200000 /* usec */
+#define DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US 200000 /* usec */
/*
* Wait period before retrying the lttng_consumer_flushed_cache when
* call returned value indicates availability.
*/
if (data_ret) {
- usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME);
+ usleep(DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US);
}
} while (data_ret != 0);