X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=usertrace%2Ftest.c;h=a0509a277bfc63561e004d34d8973519ba8dc842;hb=2d6c6b76f73668703e823a0638e7a67262668aee;hp=9c772973f64842b260baf6e8be3b22de998a44d2;hpb=92f441a729c923fa6e27fad038918a42a1c76ef0;p=lttv.git diff --git a/usertrace/test.c b/usertrace/test.c index 9c772973..a0509a27 100644 --- a/usertrace/test.c +++ b/usertrace/test.c @@ -10,6 +10,7 @@ void *thr1(void *arg) { + lttng_thread_init(); printf("thread 1, thread id : %lu, pid %lu\n", pthread_self(), getpid()); while(1) {} @@ -20,6 +21,8 @@ void *thr1(void *arg) void *thr2(void *arg) { + lttng_thread_init(); + while(1) { printf("thread 2, thread id : %lu, pid %lu\n", pthread_self(), getpid()); sleep(2); @@ -34,6 +37,7 @@ int main() pthread_t tid1, tid2; void *tret; + printf("thread main, thread id : %lu, pid %lu\n", pthread_self(), getpid()); err = pthread_create(&tid1, NULL, thr1, NULL); if(err!=0) exit(1);