Move current compile tests to 'api1'
[lttng-ust.git] / tests / compile / api1 / hello-many / hello-many.c
diff --git a/tests/compile/api1/hello-many/hello-many.c b/tests/compile/api1/hello-many/hello-many.c
new file mode 100644 (file)
index 0000000..1cae515
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2009 Pierre-Marc Fournier
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define LTTNG_UST_TRACEPOINT_DEFINE
+#include "ust_tests_hello_many.h"
+
+int main(int argc, char **argv)
+{
+       int delay = 0;
+
+       if (argc == 2)
+               delay = atoi(argv[1]);
+
+       fprintf(stderr, "Hello, World!\n");
+
+       sleep(delay);
+
+       fprintf(stderr, "Tracing... ");
+       lttng_ust_tracepoint(ust_tests_hello_many, tptest_simple1);
+       lttng_ust_tracepoint(ust_tests_hello_many, tptest_simple34);
+       fprintf(stderr, " done.\n");
+       return 0;
+}
This page took 0.025398 seconds and 4 git commands to generate.