projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e0ad5e
)
userprog: print current thread ID
author
Brian Norris
<banorris@uci.edu>
Wed, 2 May 2012 22:50:52 +0000
(15:50 -0700)
committer
Brian Norris
<banorris@uci.edu>
Wed, 2 May 2012 23:06:16 +0000
(16:06 -0700)
userprog.c
patch
|
blob
|
history
diff --git
a/userprog.c
b/userprog.c
index 2847c1af8e55d69acfe4d7cffc65924bd0b96f46..ba0c867fd195c86b08cee679468f9a93624736a1 100644
(file)
--- a/
userprog.c
+++ b/
userprog.c
@@
-30,11
+30,11
@@
void user_main()
atomic_init(&obj, 0);
- printf("
Creating 2 threads\n"
);
+ printf("
Thread %d: creating 2 threads\n", thrd_current()
);
thrd_create(&t1, (thrd_start_t)&a, &obj);
thrd_create(&t2, (thrd_start_t)&a, &obj);
thrd_join(t1);
thrd_join(t2);
- printf("Thread
is finished\n"
);
+ printf("Thread
%d is finished\n", thrd_current()
);
}