projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df08796
)
modify "user program"
author
Brian Norris
<banorris@uci.edu>
Sat, 10 Mar 2012 01:05:48 +0000
(17:05 -0800)
committer
Brian Norris
<banorris@uci.edu>
Sat, 10 Mar 2012 01:05:48 +0000
(17:05 -0800)
libthreads.c
patch
|
blob
|
history
diff --git
a/libthreads.c
b/libthreads.c
index 959fb77245e9849f56d4de1a7586a737dbca6246..15c6b94969d80fd1ac1aff6d82c27d045015664e 100644
(file)
--- a/
libthreads.c
+++ b/
libthreads.c
@@
-110,12
+110,12
@@
void thread_join(struct thread *t)
thread_yield();
}
-void a(int *
idx
)
+void a(int *
parm
)
{
int i;
for (i = 0; i < 10; i++) {
- printf("Thread %d,
loop %d\n", *idx
, i);
+ printf("Thread %d,
magic number %d, loop %d\n", current->index, *parm
, i);
if (i % 2)
thread_yield();
}
@@
-124,7
+124,7
@@
void a(int *idx)
void user_main()
{
struct thread t1, t2;
- int i =
2, j =
3;
+ int i =
17, j = 1
3;
printf("%s() creating 2 threads\n", __func__);
thread_create(&t1, &a, &i);