#define _GNU_SOURCE
#endif
+/*
+ * The order of inclusion is important here: including sdt.h _before_ the probe
+ * declarations ensures that semaphore-protected SDT probes (which we don't support) are not
+ * generated. See SYSTEMTAP(2) for more details.
+ */
+/* clang-format off */
+#include <sys/sdt.h>
+#include "foobar_provider.h"
+/* clang-format on */
+
+#include "libfoo.h"
+#include "sema.h"
+
#include <dlfcn.h>
#include <fcntl.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/sdt.h>
-
-#include "foobar_provider.h"
-#include "libfoo.h"
-#include "sema.h"
-
int main(int argc, char *argv[])
{
void *handle;
fprintf(stderr, "Can't dlopen libbar.so");
return -1;
}
- bar_function = (void (*)())dlsym(handle, "bar_function");
+ bar_function = (void (*)()) dlsym(handle, "bar_function");
bar_function();
dlclose(handle);
sema_function();
return 0;
}
-