Miscellaneous code style changes to correct little violations that
slipped through the cracks.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id378ff3fa42cb69a8543b43c08d60b9a2f2c1c06
#include <lttng/event.h>
#include <lttng/handle.h>
#include <lttng/health.h>
#include <lttng/event.h>
#include <lttng/handle.h>
#include <lttng/health.h>
-#include <lttng/kernel.h>
#include <lttng/kernel-probe.h>
#include <lttng/kernel-probe.h>
+#include <lttng/kernel.h>
#include <lttng/load.h>
#include <lttng/location.h>
#include <lttng/log-level-rule.h>
#include <lttng/load.h>
#include <lttng/location.h>
#include <lttng/log-level-rule.h>
*
* Sets the value of the argument, which must not be null.
*/
*
* Sets the value of the argument, which must not be null.
*/
-LTTNG_EXPORT extern enum lttng_error_code lttng_get_kernel_tracer_status(enum lttng_kernel_tracer_status *status);
+LTTNG_EXPORT extern enum lttng_error_code
+lttng_get_kernel_tracer_status(enum lttng_kernel_tracer_status *status);
/*
* Deprecated, replaced by lttng_regenerate_metadata.
/*
* Deprecated, replaced by lttng_regenerate_metadata.
#include "session.hpp"
#include <common/tracker.hpp>
#include "session.hpp"
#include <common/tracker.hpp>
#include <lttng/kernel.h>
struct notification_thread_handle;
#include <lttng/kernel.h>
struct notification_thread_handle;
"work for this session daemon.");
}
"work for this session daemon.");
}
- kernel_tracer_status = nonstd::optional<enum lttng_kernel_tracer_status>(LTTNG_KERNEL_TRACER_STATUS_INITIALIZED);
+ kernel_tracer_status = nonstd::optional<enum lttng_kernel_tracer_status>(
+ LTTNG_KERNEL_TRACER_STATUS_INITIALIZED);
}
pthread_mutex_unlock(&handle->cmd_queue.lock);
}
pthread_mutex_unlock(&handle->cmd_queue.lock);
- command_completion_waiter.wait();;
+ command_completion_waiter.wait();
+ ;
return 0;
error_unlock_queue:
pthread_mutex_unlock(&handle->cmd_queue.lock);
return 0;
error_unlock_queue:
pthread_mutex_unlock(&handle->cmd_queue.lock);
try {
new_cmd = new notification_thread_command;
try {
new_cmd = new notification_thread_command;
- } catch (const std::bad_alloc &e) {
+ } catch (const std::bad_alloc& e) {
ERR("Failed to allocate notification_thread_command: %s", e.what());
return nullptr;
}
ERR("Failed to allocate notification_thread_command: %s", e.what());
return nullptr;
}
#include "../command.hpp"
#include "../utils.hpp"
#include "../command.hpp"
#include "../utils.hpp"
+#include <common/lttng-kernel.hpp>
#include <common/mi-lttng.hpp>
#include <common/sessiond-comm/sessiond-comm.hpp>
#include <common/mi-lttng.hpp>
#include <common/sessiond-comm/sessiond-comm.hpp>
-#include <common/lttng-kernel.hpp>
#include <common/utils.hpp>
#include <lttng/domain-internal.hpp>
#include <common/utils.hpp>
#include <lttng/domain-internal.hpp>
std::cerr << "\tlttng-sessiond failed to open /proc/lttng" << std::endl;
break;
case LTTNG_KERNEL_TRACER_STATUS_ERR_VERSION_MISMATCH:
std::cerr << "\tlttng-sessiond failed to open /proc/lttng" << std::endl;
break;
case LTTNG_KERNEL_TRACER_STATUS_ERR_VERSION_MISMATCH:
- std::cerr
- << "\tVersion mismatch between kernel tracer and kernel tracer ABI"
- << std::endl;
+ std::cerr << "\tVersion mismatch between kernel tracer and kernel tracer ABI"
+ << std::endl;
break;
default:
std::cerr << lttng::format("\t\tUnknown kernel tracer status (%d)",
break;
default:
std::cerr << lttng::format("\t\tUnknown kernel tracer status (%d)",
}
while (uatomic_read(&_state) == WAITER_WAITING) {
}
while (uatomic_read(&_state) == WAITER_WAITING) {
- if (!futex_noasync(
- &_state, FUTEX_WAIT, WAITER_WAITING, nullptr, nullptr, 0)) {
+ if (!futex_noasync(&_state, FUTEX_WAIT, WAITER_WAITING, nullptr, nullptr, 0)) {
/*
* Prior queued wakeups queued by unrelated code
* using the same address can cause futex wait to
/*
* Prior queued wakeups queued by unrelated code
* using the same address can cause futex wait to
-void lttng::synchro::wait_queue::add(waiter &waiter) noexcept
+void lttng::synchro::wait_queue::add(waiter& waiter) noexcept
{
(void) cds_wfs_push(&_stack, &waiter._wait_queue_node);
}
{
(void) cds_wfs_push(&_stack, &waiter._wait_queue_node);
}
/* Wake all waiters in our stack head. */
cds_wfs_node *iter, *iter_n;
/* Wake all waiters in our stack head. */
cds_wfs_node *iter, *iter_n;
- cds_wfs_for_each_blocking_safe(waiters, iter, iter_n) {
+ cds_wfs_for_each_blocking_safe (waiters, iter, iter_n) {
auto& waiter = *lttng::utils::container_of(
iter, <tng::synchro::waiter::_wait_queue_node);
auto& waiter = *lttng::utils::container_of(
iter, <tng::synchro::waiter::_wait_queue_node);
-int main() {
- struct timespec t;
- int ret = lttng_clock_gettime(CLOCK_MONOTONIC, &t);
- if (ret == 0) {
- printf("%ld.%09ld\n", t.tv_sec, t.tv_nsec);
- }
- return ret;
+int main()
+{
+ struct timespec t;
+ const auto ret = lttng_clock_gettime(CLOCK_MONOTONIC, &t);
+
+ if (ret == 0) {
+ printf("%ld.%09ld\n", t.tv_sec, t.tv_nsec);
+ }
+
+ return ret;