Rev 627 | Rev 1104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 627 | Rev 1062 | ||
|---|---|---|---|
| Line 93... | Line 93... | ||
| 93 | 93 | ||
| 94 | printf("Creating %d readers and %d writers...", readers, writers); |
94 | printf("Creating %d readers and %d writers...", readers, writers); |
| 95 | 95 | ||
| 96 | for (j=0; j<(READERS+WRITERS)/2; j++) { |
96 | for (j=0; j<(READERS+WRITERS)/2; j++) { |
| 97 | for (k=0; k<i; k++) { |
97 | for (k=0; k<i; k++) { |
| 98 | thrd = thread_create(reader, NULL, TASK, 0); |
98 | thrd = thread_create(reader, NULL, TASK, 0, "reader"); |
| 99 | if (thrd) |
99 | if (thrd) |
| 100 | thread_ready(thrd); |
100 | thread_ready(thrd); |
| 101 | else |
101 | else |
| 102 | failed(); |
102 | failed(); |
| 103 | } |
103 | } |
| 104 | for (k=0; k<(4-i); k++) { |
104 | for (k=0; k<(4-i); k++) { |
| 105 | thrd = thread_create(writer, NULL, TASK, 0); |
105 | thrd = thread_create(writer, NULL, TASK, 0, "writer"); |
| 106 | if (thrd) |
106 | if (thrd) |
| 107 | thread_ready(thrd); |
107 | thread_ready(thrd); |
| 108 | else |
108 | else |
| 109 | failed(); |
109 | failed(); |
| 110 | } |
110 | } |