Export consumer ABI, implement ring buffer modifications for consumer
[lttng-ust.git] / tests / hello / hello.c
index d30901a5517108a5e6c67135e2b279a25a9e181b..03d07b675e8e99107ec12c78bd6a5de1f4ef9815 100644 (file)
@@ -25,9 +25,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <string.h>
 
-#include "usterr.h"
-#include "tp.h"
+#include "ust_tests_hello.h"
 
 void inthandler(int sig)
 {
@@ -40,9 +40,10 @@ int init_int_handler(void)
        int result;
        struct sigaction act;
 
+       memset(&act, 0, sizeof(act));
        result = sigemptyset(&act.sa_mask);
        if (result == -1) {
-               PERROR("sigemptyset");
+               perror("sigemptyset");
                return -1;
        }
 
@@ -54,7 +55,7 @@ int init_int_handler(void)
         */
        result = sigaction(SIGUSR1, &act, NULL);
        if (result == -1) {
-               PERROR("sigaction");
+               perror("sigaction");
                return -1;
        }
 
@@ -64,16 +65,22 @@ int init_int_handler(void)
 int main(int argc, char **argv)
 {
        int i;
+       long values[] = { 1, 2, 3 };
+       char text[10] = "test";
+       double dbl = 2.0;
+       float flt = 2222.0;
 
        init_int_handler();
 
        printf("Hello, World!\n");
 
-       sleep(1);
+       sleep(10);
 
-       for (i = 0; i < 50; i++) {
-               tracepoint(ust_tests_hello_tptest, i);
-               usleep(100000);
+       //for (i = 0; i < 50; i++) {
+       for (i = 0; i < 1000000; i++) {
+               tracepoint(ust_tests_hello_tptest, i, values,
+                          text, strlen(text), dbl, flt);
+               //usleep(100000);
        }
        return 0;
 }
This page took 0.024615 seconds and 4 git commands to generate.