projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ltt_show_debug
[lttv.git]
/
usertrace
/
test.c
diff --git
a/usertrace/test.c
b/usertrace/test.c
index 9c772973f64842b260baf6e8be3b22de998a44d2..a0509a277bfc63561e004d34d8973519ba8dc842 100644
(file)
--- a/
usertrace/test.c
+++ b/
usertrace/test.c
@@
-10,6
+10,7
@@
void *thr1(void *arg)
{
void *thr1(void *arg)
{
+ lttng_thread_init();
printf("thread 1, thread id : %lu, pid %lu\n", pthread_self(), getpid());
while(1) {}
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)
{
void *thr2(void *arg)
{
+ lttng_thread_init();
+
while(1) {
printf("thread 2, thread id : %lu, pid %lu\n", pthread_self(), getpid());
sleep(2);
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;
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);
err = pthread_create(&tid1, NULL, thr1, NULL);
if(err!=0) exit(1);
This page took
0.023769 seconds
and
4
git commands to generate.