Rev 625 | Rev 1196 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 625 | Rev 1062 | ||
---|---|---|---|
Line 135... | Line 135... | ||
135 | printf("sp=%X, readers_in=%d\n", ctx.sp, rwlock.readers_in); |
135 | printf("sp=%X, readers_in=%d\n", ctx.sp, rwlock.readers_in); |
136 | 136 | ||
137 | k = random(7) + 1; |
137 | k = random(7) + 1; |
138 | printf("Creating %d readers\n", k); |
138 | printf("Creating %d readers\n", k); |
139 | for (i=0; i<k; i++) { |
139 | for (i=0; i<k; i++) { |
140 | thrd = thread_create(reader, NULL, TASK, 0); |
140 | thrd = thread_create(reader, NULL, TASK, 0, "reader"); |
141 | if (thrd) |
141 | if (thrd) |
142 | thread_ready(thrd); |
142 | thread_ready(thrd); |
143 | else |
143 | else |
144 | failed(); |
144 | failed(); |
145 | } |
145 | } |
146 | 146 | ||
147 | k = random(5) + 1; |
147 | k = random(5) + 1; |
148 | printf("Creating %d writers\n", k); |
148 | printf("Creating %d writers\n", k); |
149 | for (i=0; i<k; i++) { |
149 | for (i=0; i<k; i++) { |
150 | thrd = thread_create(writer, NULL, TASK, 0); |
150 | thrd = thread_create(writer, NULL, TASK, 0, "writer"); |
151 | if (thrd) |
151 | if (thrd) |
152 | thread_ready(thrd); |
152 | thread_ready(thrd); |
153 | else |
153 | else |
154 | failed(); |
154 | failed(); |
155 | } |
155 | } |