Tests: fix: test_list_triggers_cli fails to list userspace-probe-sdt trigger
[lttng-tools.git] / tests / utils / testapp / userspace-probe-sdt-binary / sema.c
index 3126e91ada8212385f0e0b7fe3a2014cc0cb991b..ef8ed2629ddc6bc6fafa5c3fb3f26238593776aa 100644 (file)
@@ -5,8 +5,17 @@
  *
  */
 
+/*
+ * The order of inclusion is important here: including sdt.h _after_ the probe
+ * declarations ensures that semaphore-protected SDT probes are
+ * generated. See SYSTEMTAP(2) for more details.
+ */
+/* clang-format off */
 #include "foobar_provider.h"
 #include <sys/sdt.h>
-void sema_function() {
+/* clang-format on */
+
+void sema_function()
+{
        FOOBAR_TP_WITH_SEMAPHORE();
 }
This page took 0.024867 seconds and 4 git commands to generate.