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 97... | Line 97... | ||
| 97 | 97 | ||
| 98 | printf("Creating %d consumers and %d producers...", consumers, producers); |
98 | printf("Creating %d consumers and %d producers...", consumers, producers); |
| 99 | 99 | ||
| 100 | for (j=0; j<(CONSUMERS+PRODUCERS)/2; j++) { |
100 | for (j=0; j<(CONSUMERS+PRODUCERS)/2; j++) { |
| 101 | for (k=0; k<i; k++) { |
101 | for (k=0; k<i; k++) { |
| 102 | thrd = thread_create(consumer, NULL, TASK, 0); |
102 | thrd = thread_create(consumer, NULL, TASK, 0, "consumer"); |
| 103 | if (thrd) |
103 | if (thrd) |
| 104 | thread_ready(thrd); |
104 | thread_ready(thrd); |
| 105 | else |
105 | else |
| 106 | failed(); |
106 | failed(); |
| 107 | } |
107 | } |
| 108 | for (k=0; k<(4-i); k++) { |
108 | for (k=0; k<(4-i); k++) { |
| 109 | thrd = thread_create(producer, NULL, TASK, 0); |
109 | thrd = thread_create(producer, NULL, TASK, 0, "producer"); |
| 110 | if (thrd) |
110 | if (thrd) |
| 111 | thread_ready(thrd); |
111 | thread_ready(thrd); |
| 112 | else |
112 | else |
| 113 | failed(); |
113 | failed(); |
| 114 | } |
114 | } |