1 /* Define the ThreadX SMP random resume/suspend test.  */
2 
3 #include   <stdio.h>
4 #include   "tx_api.h"
5 
6 //#define MAX_PASSES      50000000
7 //#define MAX_PASSES      50000
8 #define MAX_PASSES      500
9 
10 
11 /* Define the ThreadX object control blocks... Must have 256 priority levels... and assumes 4 cores.  */
12 
13 static TX_THREAD               thread_0;
14 static TX_THREAD               thread_1;
15 static TX_THREAD               thread_2;
16 static TX_THREAD               thread_3;
17 static TX_THREAD               thread_4;
18 static TX_THREAD               thread_5;
19 static TX_THREAD               thread_6;
20 static TX_THREAD               thread_7;
21 static TX_THREAD               thread_8;
22 static TX_THREAD               thread_9;
23 static TX_THREAD               thread_10;
24 static TX_THREAD               thread_11;
25 static TX_THREAD               thread_12;
26 static TX_THREAD               thread_13;
27 static TX_THREAD               thread_14;
28 static TX_THREAD               thread_15;
29 static TX_THREAD               thread_16;
30 static TX_THREAD               thread_17;
31 static TX_THREAD               thread_18;
32 static TX_THREAD               thread_19;
33 static TX_THREAD               thread_20;
34 static TX_THREAD               thread_21;
35 static TX_THREAD               thread_22;
36 static TX_THREAD               thread_23;
37 static TX_THREAD               thread_24;
38 static TX_THREAD               thread_25;
39 static TX_THREAD               thread_26;
40 static TX_THREAD               thread_27;
41 static TX_THREAD               thread_28;
42 static TX_THREAD               thread_29;
43 static TX_THREAD               thread_30;
44 static TX_THREAD               thread_31;
45 static TX_THREAD               thread_32;
46 static TX_THREAD               thread_33;
47 static TX_THREAD               thread_34;
48 static TX_THREAD               thread_35;
49 static TX_THREAD               thread_36;
50 static TX_THREAD               thread_37;
51 static TX_THREAD               thread_38;
52 static TX_THREAD               thread_39;
53 static TX_THREAD               thread_40;
54 static TX_THREAD               thread_41;
55 static TX_THREAD               thread_42;
56 static TX_THREAD               thread_43;
57 static TX_THREAD               thread_44;
58 static TX_THREAD               thread_45;
59 static TX_THREAD               thread_46;
60 static TX_THREAD               thread_47;
61 static TX_THREAD               thread_48;
62 static TX_THREAD               thread_49;
63 static TX_THREAD               thread_50;
64 static TX_THREAD               thread_51;
65 static TX_THREAD               thread_52;
66 static TX_THREAD               thread_53;
67 static TX_THREAD               thread_54;
68 static TX_THREAD               thread_55;
69 static TX_THREAD               thread_56;
70 static TX_THREAD               thread_57;
71 static TX_THREAD               thread_58;
72 static TX_THREAD               thread_59;
73 static TX_THREAD               thread_60;
74 static TX_THREAD               thread_61;
75 static TX_THREAD               thread_62;
76 static TX_THREAD               thread_63;
77 static TX_THREAD               thread_64;
78 static TX_THREAD               thread_65;
79 static TX_THREAD               thread_66;
80 static TX_THREAD               thread_67;
81 static TX_THREAD               thread_68;
82 static TX_THREAD               thread_69;
83 static TX_THREAD               thread_70;
84 static TX_THREAD               thread_71;
85 static TX_THREAD               thread_72;
86 static TX_THREAD               thread_73;
87 static TX_THREAD               thread_74;
88 static TX_THREAD               thread_75;
89 static TX_THREAD               thread_76;
90 static TX_THREAD               thread_77;
91 static TX_THREAD               thread_78;
92 static TX_THREAD               thread_79;
93 static TX_THREAD               thread_80;
94 static TX_THREAD               thread_81;
95 static TX_THREAD               thread_82;
96 static TX_THREAD               thread_83;
97 static TX_THREAD               thread_84;
98 static TX_THREAD               thread_85;
99 static TX_THREAD               thread_86;
100 static TX_THREAD               thread_87;
101 static TX_THREAD               thread_88;
102 static TX_THREAD               thread_89;
103 static TX_THREAD               thread_90;
104 static TX_THREAD               thread_91;
105 static TX_THREAD               thread_92;
106 static TX_THREAD               thread_93;
107 static TX_THREAD               thread_94;
108 static TX_THREAD               thread_95;
109 static TX_THREAD               thread_96;
110 static TX_THREAD               thread_97;
111 static TX_THREAD               thread_98;
112 static TX_THREAD               thread_99;
113 static TX_THREAD               thread_100;
114 static TX_THREAD               thread_101;
115 static TX_THREAD               thread_102;
116 static TX_THREAD               thread_103;
117 static TX_THREAD               thread_104;
118 static TX_THREAD               thread_105;
119 static TX_THREAD               thread_106;
120 static TX_THREAD               thread_107;
121 static TX_THREAD               thread_108;
122 static TX_THREAD               thread_109;
123 static TX_THREAD               thread_110;
124 static TX_THREAD               thread_111;
125 static TX_THREAD               thread_112;
126 static TX_THREAD               thread_113;
127 static TX_THREAD               thread_114;
128 static TX_THREAD               thread_115;
129 static TX_THREAD               thread_116;
130 static TX_THREAD               thread_117;
131 static TX_THREAD               thread_118;
132 static TX_THREAD               thread_119;
133 static TX_THREAD               thread_120;
134 static TX_THREAD               thread_121;
135 static TX_THREAD               thread_122;
136 static TX_THREAD               thread_123;
137 static TX_THREAD               thread_124;
138 static TX_THREAD               thread_125;
139 static TX_THREAD               thread_126;
140 static TX_THREAD               thread_127;
141 static TX_THREAD               thread_128;
142 static TX_THREAD               thread_129;
143 static TX_THREAD               thread_130;
144 static TX_THREAD               thread_131;
145 static TX_THREAD               thread_132;
146 static TX_THREAD               thread_133;
147 static TX_THREAD               thread_134;
148 static TX_THREAD               thread_135;
149 static TX_THREAD               thread_136;
150 static TX_THREAD               thread_137;
151 static TX_THREAD               thread_138;
152 static TX_THREAD               thread_139;
153 static TX_THREAD               thread_140;
154 static TX_THREAD               thread_141;
155 static TX_THREAD               thread_142;
156 static TX_THREAD               thread_143;
157 static TX_THREAD               thread_144;
158 static TX_THREAD               thread_145;
159 static TX_THREAD               thread_146;
160 static TX_THREAD               thread_147;
161 static TX_THREAD               thread_148;
162 static TX_THREAD               thread_149;
163 static TX_THREAD               thread_150;
164 static TX_THREAD               thread_151;
165 static TX_THREAD               thread_152;
166 static TX_THREAD               thread_153;
167 static TX_THREAD               thread_154;
168 static TX_THREAD               thread_155;
169 static TX_THREAD               thread_156;
170 static TX_THREAD               thread_157;
171 static TX_THREAD               thread_158;
172 static TX_THREAD               thread_159;
173 static TX_THREAD               thread_160;
174 static TX_THREAD               thread_161;
175 static TX_THREAD               thread_162;
176 static TX_THREAD               thread_163;
177 static TX_THREAD               thread_164;
178 static TX_THREAD               thread_165;
179 static TX_THREAD               thread_166;
180 static TX_THREAD               thread_167;
181 static TX_THREAD               thread_168;
182 static TX_THREAD               thread_169;
183 static TX_THREAD               thread_170;
184 static TX_THREAD               thread_171;
185 static TX_THREAD               thread_172;
186 static TX_THREAD               thread_173;
187 static TX_THREAD               thread_174;
188 static TX_THREAD               thread_175;
189 static TX_THREAD               thread_176;
190 static TX_THREAD               thread_177;
191 static TX_THREAD               thread_178;
192 static TX_THREAD               thread_179;
193 static TX_THREAD               thread_180;
194 static TX_THREAD               thread_181;
195 static TX_THREAD               thread_182;
196 static TX_THREAD               thread_183;
197 static TX_THREAD               thread_184;
198 static TX_THREAD               thread_185;
199 static TX_THREAD               thread_186;
200 static TX_THREAD               thread_187;
201 static TX_THREAD               thread_188;
202 static TX_THREAD               thread_189;
203 static TX_THREAD               thread_190;
204 static TX_THREAD               thread_191;
205 static TX_THREAD               thread_192;
206 static TX_THREAD               thread_193;
207 static TX_THREAD               thread_194;
208 static TX_THREAD               thread_195;
209 static TX_THREAD               thread_196;
210 static TX_THREAD               thread_197;
211 static TX_THREAD               thread_198;
212 static TX_THREAD               thread_199;
213 static TX_THREAD               thread_200;
214 static TX_THREAD               thread_201;
215 static TX_THREAD               thread_202;
216 static TX_THREAD               thread_203;
217 static TX_THREAD               thread_204;
218 static TX_THREAD               thread_205;
219 static TX_THREAD               thread_206;
220 static TX_THREAD               thread_207;
221 static TX_THREAD               thread_208;
222 static TX_THREAD               thread_209;
223 static TX_THREAD               thread_210;
224 static TX_THREAD               thread_211;
225 static TX_THREAD               thread_212;
226 static TX_THREAD               thread_213;
227 static TX_THREAD               thread_214;
228 static TX_THREAD               thread_215;
229 static TX_THREAD               thread_216;
230 static TX_THREAD               thread_217;
231 static TX_THREAD               thread_218;
232 static TX_THREAD               thread_219;
233 static TX_THREAD               thread_220;
234 static TX_THREAD               thread_221;
235 static TX_THREAD               thread_222;
236 static TX_THREAD               thread_223;
237 static TX_THREAD               thread_224;
238 static TX_THREAD               thread_225;
239 static TX_THREAD               thread_226;
240 static TX_THREAD               thread_227;
241 static TX_THREAD               thread_228;
242 static TX_THREAD               thread_229;
243 static TX_THREAD               thread_230;
244 static TX_THREAD               thread_231;
245 static TX_THREAD               thread_232;
246 static TX_THREAD               thread_233;
247 static TX_THREAD               thread_234;
248 static TX_THREAD               thread_235;
249 static TX_THREAD               thread_236;
250 static TX_THREAD               thread_237;
251 static TX_THREAD               thread_238;
252 static TX_THREAD               thread_239;
253 static TX_THREAD               thread_240;
254 static TX_THREAD               thread_241;
255 static TX_THREAD               thread_242;
256 static TX_THREAD               thread_243;
257 static TX_THREAD               thread_244;
258 static TX_THREAD               thread_245;
259 static TX_THREAD               thread_246;
260 static TX_THREAD               thread_247;
261 static TX_THREAD               thread_248;
262 static TX_THREAD               thread_249;
263 static TX_THREAD               thread_250;
264 static TX_THREAD               thread_251;
265 static TX_THREAD               thread_252;
266 static TX_THREAD               thread_253;
267 static TX_THREAD               thread_254;
268 static TX_THREAD               thread_255;
269 
270 static TX_THREAD               thread_0_1;
271 static TX_THREAD               thread_1_1;
272 static TX_THREAD               thread_2_1;
273 static TX_THREAD               thread_3_1;
274 static TX_THREAD               thread_4_1;
275 static TX_THREAD               thread_5_1;
276 static TX_THREAD               thread_6_1;
277 static TX_THREAD               thread_7_1;
278 static TX_THREAD               thread_8_1;
279 static TX_THREAD               thread_9_1;
280 static TX_THREAD               thread_10_1;
281 static TX_THREAD               thread_11_1;
282 static TX_THREAD               thread_12_1;
283 static TX_THREAD               thread_13_1;
284 static TX_THREAD               thread_14_1;
285 static TX_THREAD               thread_15_1;
286 static TX_THREAD               thread_16_1;
287 static TX_THREAD               thread_17_1;
288 static TX_THREAD               thread_18_1;
289 static TX_THREAD               thread_19_1;
290 static TX_THREAD               thread_20_1;
291 static TX_THREAD               thread_21_1;
292 static TX_THREAD               thread_22_1;
293 static TX_THREAD               thread_23_1;
294 static TX_THREAD               thread_24_1;
295 static TX_THREAD               thread_25_1;
296 static TX_THREAD               thread_26_1;
297 static TX_THREAD               thread_27_1;
298 static TX_THREAD               thread_28_1;
299 static TX_THREAD               thread_29_1;
300 static TX_THREAD               thread_30_1;
301 static TX_THREAD               thread_31_1;
302 static TX_THREAD               thread_32_1;
303 static TX_THREAD               thread_33_1;
304 static TX_THREAD               thread_34_1;
305 static TX_THREAD               thread_35_1;
306 static TX_THREAD               thread_36_1;
307 static TX_THREAD               thread_37_1;
308 static TX_THREAD               thread_38_1;
309 static TX_THREAD               thread_39_1;
310 static TX_THREAD               thread_40_1;
311 static TX_THREAD               thread_41_1;
312 static TX_THREAD               thread_42_1;
313 static TX_THREAD               thread_43_1;
314 static TX_THREAD               thread_44_1;
315 static TX_THREAD               thread_45_1;
316 static TX_THREAD               thread_46_1;
317 static TX_THREAD               thread_47_1;
318 static TX_THREAD               thread_48_1;
319 static TX_THREAD               thread_49_1;
320 static TX_THREAD               thread_50_1;
321 static TX_THREAD               thread_51_1;
322 static TX_THREAD               thread_52_1;
323 static TX_THREAD               thread_53_1;
324 static TX_THREAD               thread_54_1;
325 static TX_THREAD               thread_55_1;
326 static TX_THREAD               thread_56_1;
327 static TX_THREAD               thread_57_1;
328 static TX_THREAD               thread_58_1;
329 static TX_THREAD               thread_59_1;
330 static TX_THREAD               thread_60_1;
331 static TX_THREAD               thread_61_1;
332 static TX_THREAD               thread_62_1;
333 static TX_THREAD               thread_63_1;
334 static TX_THREAD               thread_64_1;
335 static TX_THREAD               thread_65_1;
336 static TX_THREAD               thread_66_1;
337 static TX_THREAD               thread_67_1;
338 static TX_THREAD               thread_68_1;
339 static TX_THREAD               thread_69_1;
340 static TX_THREAD               thread_70_1;
341 static TX_THREAD               thread_71_1;
342 static TX_THREAD               thread_72_1;
343 static TX_THREAD               thread_73_1;
344 static TX_THREAD               thread_74_1;
345 static TX_THREAD               thread_75_1;
346 static TX_THREAD               thread_76_1;
347 static TX_THREAD               thread_77_1;
348 static TX_THREAD               thread_78_1;
349 static TX_THREAD               thread_79_1;
350 static TX_THREAD               thread_80_1;
351 static TX_THREAD               thread_81_1;
352 static TX_THREAD               thread_82_1;
353 static TX_THREAD               thread_83_1;
354 static TX_THREAD               thread_84_1;
355 static TX_THREAD               thread_85_1;
356 static TX_THREAD               thread_86_1;
357 static TX_THREAD               thread_87_1;
358 static TX_THREAD               thread_88_1;
359 static TX_THREAD               thread_89_1;
360 static TX_THREAD               thread_90_1;
361 static TX_THREAD               thread_91_1;
362 static TX_THREAD               thread_92_1;
363 static TX_THREAD               thread_93_1;
364 static TX_THREAD               thread_94_1;
365 static TX_THREAD               thread_95_1;
366 static TX_THREAD               thread_96_1;
367 static TX_THREAD               thread_97_1;
368 static TX_THREAD               thread_98_1;
369 static TX_THREAD               thread_99_1;
370 static TX_THREAD               thread_100_1;
371 static TX_THREAD               thread_101_1;
372 static TX_THREAD               thread_102_1;
373 static TX_THREAD               thread_103_1;
374 static TX_THREAD               thread_104_1;
375 static TX_THREAD               thread_105_1;
376 static TX_THREAD               thread_106_1;
377 static TX_THREAD               thread_107_1;
378 static TX_THREAD               thread_108_1;
379 static TX_THREAD               thread_109_1;
380 static TX_THREAD               thread_110_1;
381 static TX_THREAD               thread_111_1;
382 static TX_THREAD               thread_112_1;
383 static TX_THREAD               thread_113_1;
384 static TX_THREAD               thread_114_1;
385 static TX_THREAD               thread_115_1;
386 static TX_THREAD               thread_116_1;
387 static TX_THREAD               thread_117_1;
388 static TX_THREAD               thread_118_1;
389 static TX_THREAD               thread_119_1;
390 static TX_THREAD               thread_120_1;
391 static TX_THREAD               thread_121_1;
392 static TX_THREAD               thread_122_1;
393 static TX_THREAD               thread_123_1;
394 static TX_THREAD               thread_124_1;
395 static TX_THREAD               thread_125_1;
396 static TX_THREAD               thread_126_1;
397 static TX_THREAD               thread_127_1;
398 static TX_THREAD               thread_128_1;
399 static TX_THREAD               thread_129_1;
400 static TX_THREAD               thread_130_1;
401 static TX_THREAD               thread_131_1;
402 static TX_THREAD               thread_132_1;
403 static TX_THREAD               thread_133_1;
404 static TX_THREAD               thread_134_1;
405 static TX_THREAD               thread_135_1;
406 static TX_THREAD               thread_136_1;
407 static TX_THREAD               thread_137_1;
408 static TX_THREAD               thread_138_1;
409 static TX_THREAD               thread_139_1;
410 static TX_THREAD               thread_140_1;
411 static TX_THREAD               thread_141_1;
412 static TX_THREAD               thread_142_1;
413 static TX_THREAD               thread_143_1;
414 static TX_THREAD               thread_144_1;
415 static TX_THREAD               thread_145_1;
416 static TX_THREAD               thread_146_1;
417 static TX_THREAD               thread_147_1;
418 static TX_THREAD               thread_148_1;
419 static TX_THREAD               thread_149_1;
420 static TX_THREAD               thread_150_1;
421 static TX_THREAD               thread_151_1;
422 static TX_THREAD               thread_152_1;
423 static TX_THREAD               thread_153_1;
424 static TX_THREAD               thread_154_1;
425 static TX_THREAD               thread_155_1;
426 static TX_THREAD               thread_156_1;
427 static TX_THREAD               thread_157_1;
428 static TX_THREAD               thread_158_1;
429 static TX_THREAD               thread_159_1;
430 static TX_THREAD               thread_160_1;
431 static TX_THREAD               thread_161_1;
432 static TX_THREAD               thread_162_1;
433 static TX_THREAD               thread_163_1;
434 static TX_THREAD               thread_164_1;
435 static TX_THREAD               thread_165_1;
436 static TX_THREAD               thread_166_1;
437 static TX_THREAD               thread_167_1;
438 static TX_THREAD               thread_168_1;
439 static TX_THREAD               thread_169_1;
440 static TX_THREAD               thread_170_1;
441 static TX_THREAD               thread_171_1;
442 static TX_THREAD               thread_172_1;
443 static TX_THREAD               thread_173_1;
444 static TX_THREAD               thread_174_1;
445 static TX_THREAD               thread_175_1;
446 static TX_THREAD               thread_176_1;
447 static TX_THREAD               thread_177_1;
448 static TX_THREAD               thread_178_1;
449 static TX_THREAD               thread_179_1;
450 static TX_THREAD               thread_180_1;
451 static TX_THREAD               thread_181_1;
452 static TX_THREAD               thread_182_1;
453 static TX_THREAD               thread_183_1;
454 static TX_THREAD               thread_184_1;
455 static TX_THREAD               thread_185_1;
456 static TX_THREAD               thread_186_1;
457 static TX_THREAD               thread_187_1;
458 static TX_THREAD               thread_188_1;
459 static TX_THREAD               thread_189_1;
460 static TX_THREAD               thread_190_1;
461 static TX_THREAD               thread_191_1;
462 static TX_THREAD               thread_192_1;
463 static TX_THREAD               thread_193_1;
464 static TX_THREAD               thread_194_1;
465 static TX_THREAD               thread_195_1;
466 static TX_THREAD               thread_196_1;
467 static TX_THREAD               thread_197_1;
468 static TX_THREAD               thread_198_1;
469 static TX_THREAD               thread_199_1;
470 static TX_THREAD               thread_200_1;
471 static TX_THREAD               thread_201_1;
472 static TX_THREAD               thread_202_1;
473 static TX_THREAD               thread_203_1;
474 static TX_THREAD               thread_204_1;
475 static TX_THREAD               thread_205_1;
476 static TX_THREAD               thread_206_1;
477 static TX_THREAD               thread_207_1;
478 static TX_THREAD               thread_208_1;
479 static TX_THREAD               thread_209_1;
480 static TX_THREAD               thread_210_1;
481 static TX_THREAD               thread_211_1;
482 static TX_THREAD               thread_212_1;
483 static TX_THREAD               thread_213_1;
484 static TX_THREAD               thread_214_1;
485 static TX_THREAD               thread_215_1;
486 static TX_THREAD               thread_216_1;
487 static TX_THREAD               thread_217_1;
488 static TX_THREAD               thread_218_1;
489 static TX_THREAD               thread_219_1;
490 static TX_THREAD               thread_220_1;
491 static TX_THREAD               thread_221_1;
492 static TX_THREAD               thread_222_1;
493 static TX_THREAD               thread_223_1;
494 static TX_THREAD               thread_224_1;
495 static TX_THREAD               thread_225_1;
496 static TX_THREAD               thread_226_1;
497 static TX_THREAD               thread_227_1;
498 static TX_THREAD               thread_228_1;
499 static TX_THREAD               thread_229_1;
500 static TX_THREAD               thread_230_1;
501 static TX_THREAD               thread_231_1;
502 static TX_THREAD               thread_232_1;
503 static TX_THREAD               thread_233_1;
504 static TX_THREAD               thread_234_1;
505 static TX_THREAD               thread_235_1;
506 static TX_THREAD               thread_236_1;
507 static TX_THREAD               thread_237_1;
508 static TX_THREAD               thread_238_1;
509 static TX_THREAD               thread_239_1;
510 static TX_THREAD               thread_240_1;
511 static TX_THREAD               thread_241_1;
512 static TX_THREAD               thread_242_1;
513 static TX_THREAD               thread_243_1;
514 static TX_THREAD               thread_244_1;
515 static TX_THREAD               thread_245_1;
516 static TX_THREAD               thread_246_1;
517 static TX_THREAD               thread_247_1;
518 static TX_THREAD               thread_248_1;
519 static TX_THREAD               thread_249_1;
520 static TX_THREAD               thread_250_1;
521 static TX_THREAD               thread_251_1;
522 static TX_THREAD               thread_252_1;
523 static TX_THREAD               thread_253_1;
524 static TX_THREAD               thread_254_1;
525 static TX_THREAD               thread_255_1;
526 
527 static TX_THREAD               thread_0_2;
528 static TX_THREAD               thread_1_2;
529 static TX_THREAD               thread_2_2;
530 static TX_THREAD               thread_3_2;
531 static TX_THREAD               thread_4_2;
532 static TX_THREAD               thread_5_2;
533 static TX_THREAD               thread_6_2;
534 static TX_THREAD               thread_7_2;
535 static TX_THREAD               thread_8_2;
536 static TX_THREAD               thread_9_2;
537 static TX_THREAD               thread_10_2;
538 static TX_THREAD               thread_11_2;
539 static TX_THREAD               thread_12_2;
540 static TX_THREAD               thread_13_2;
541 static TX_THREAD               thread_14_2;
542 static TX_THREAD               thread_15_2;
543 static TX_THREAD               thread_16_2;
544 static TX_THREAD               thread_17_2;
545 static TX_THREAD               thread_18_2;
546 static TX_THREAD               thread_19_2;
547 static TX_THREAD               thread_20_2;
548 static TX_THREAD               thread_21_2;
549 static TX_THREAD               thread_22_2;
550 static TX_THREAD               thread_23_2;
551 static TX_THREAD               thread_24_2;
552 static TX_THREAD               thread_25_2;
553 static TX_THREAD               thread_26_2;
554 static TX_THREAD               thread_27_2;
555 static TX_THREAD               thread_28_2;
556 static TX_THREAD               thread_29_2;
557 static TX_THREAD               thread_30_2;
558 static TX_THREAD               thread_31_2;
559 static TX_THREAD               thread_32_2;
560 static TX_THREAD               thread_33_2;
561 static TX_THREAD               thread_34_2;
562 static TX_THREAD               thread_35_2;
563 static TX_THREAD               thread_36_2;
564 static TX_THREAD               thread_37_2;
565 static TX_THREAD               thread_38_2;
566 static TX_THREAD               thread_39_2;
567 static TX_THREAD               thread_40_2;
568 static TX_THREAD               thread_41_2;
569 static TX_THREAD               thread_42_2;
570 static TX_THREAD               thread_43_2;
571 static TX_THREAD               thread_44_2;
572 static TX_THREAD               thread_45_2;
573 static TX_THREAD               thread_46_2;
574 static TX_THREAD               thread_47_2;
575 static TX_THREAD               thread_48_2;
576 static TX_THREAD               thread_49_2;
577 static TX_THREAD               thread_50_2;
578 static TX_THREAD               thread_51_2;
579 static TX_THREAD               thread_52_2;
580 static TX_THREAD               thread_53_2;
581 static TX_THREAD               thread_54_2;
582 static TX_THREAD               thread_55_2;
583 static TX_THREAD               thread_56_2;
584 static TX_THREAD               thread_57_2;
585 static TX_THREAD               thread_58_2;
586 static TX_THREAD               thread_59_2;
587 static TX_THREAD               thread_60_2;
588 static TX_THREAD               thread_61_2;
589 static TX_THREAD               thread_62_2;
590 static TX_THREAD               thread_63_2;
591 static TX_THREAD               thread_64_2;
592 static TX_THREAD               thread_65_2;
593 static TX_THREAD               thread_66_2;
594 static TX_THREAD               thread_67_2;
595 static TX_THREAD               thread_68_2;
596 static TX_THREAD               thread_69_2;
597 static TX_THREAD               thread_70_2;
598 static TX_THREAD               thread_71_2;
599 static TX_THREAD               thread_72_2;
600 static TX_THREAD               thread_73_2;
601 static TX_THREAD               thread_74_2;
602 static TX_THREAD               thread_75_2;
603 static TX_THREAD               thread_76_2;
604 static TX_THREAD               thread_77_2;
605 static TX_THREAD               thread_78_2;
606 static TX_THREAD               thread_79_2;
607 static TX_THREAD               thread_80_2;
608 static TX_THREAD               thread_81_2;
609 static TX_THREAD               thread_82_2;
610 static TX_THREAD               thread_83_2;
611 static TX_THREAD               thread_84_2;
612 static TX_THREAD               thread_85_2;
613 static TX_THREAD               thread_86_2;
614 static TX_THREAD               thread_87_2;
615 static TX_THREAD               thread_88_2;
616 static TX_THREAD               thread_89_2;
617 static TX_THREAD               thread_90_2;
618 static TX_THREAD               thread_91_2;
619 static TX_THREAD               thread_92_2;
620 static TX_THREAD               thread_93_2;
621 static TX_THREAD               thread_94_2;
622 static TX_THREAD               thread_95_2;
623 static TX_THREAD               thread_96_2;
624 static TX_THREAD               thread_97_2;
625 static TX_THREAD               thread_98_2;
626 static TX_THREAD               thread_99_2;
627 static TX_THREAD               thread_100_2;
628 static TX_THREAD               thread_101_2;
629 static TX_THREAD               thread_102_2;
630 static TX_THREAD               thread_103_2;
631 static TX_THREAD               thread_104_2;
632 static TX_THREAD               thread_105_2;
633 static TX_THREAD               thread_106_2;
634 static TX_THREAD               thread_107_2;
635 static TX_THREAD               thread_108_2;
636 static TX_THREAD               thread_109_2;
637 static TX_THREAD               thread_110_2;
638 static TX_THREAD               thread_111_2;
639 static TX_THREAD               thread_112_2;
640 static TX_THREAD               thread_113_2;
641 static TX_THREAD               thread_114_2;
642 static TX_THREAD               thread_115_2;
643 static TX_THREAD               thread_116_2;
644 static TX_THREAD               thread_117_2;
645 static TX_THREAD               thread_118_2;
646 static TX_THREAD               thread_119_2;
647 static TX_THREAD               thread_120_2;
648 static TX_THREAD               thread_121_2;
649 static TX_THREAD               thread_122_2;
650 static TX_THREAD               thread_123_2;
651 static TX_THREAD               thread_124_2;
652 static TX_THREAD               thread_125_2;
653 static TX_THREAD               thread_126_2;
654 static TX_THREAD               thread_127_2;
655 static TX_THREAD               thread_128_2;
656 static TX_THREAD               thread_129_2;
657 static TX_THREAD               thread_130_2;
658 static TX_THREAD               thread_131_2;
659 static TX_THREAD               thread_132_2;
660 static TX_THREAD               thread_133_2;
661 static TX_THREAD               thread_134_2;
662 static TX_THREAD               thread_135_2;
663 static TX_THREAD               thread_136_2;
664 static TX_THREAD               thread_137_2;
665 static TX_THREAD               thread_138_2;
666 static TX_THREAD               thread_139_2;
667 static TX_THREAD               thread_140_2;
668 static TX_THREAD               thread_141_2;
669 static TX_THREAD               thread_142_2;
670 static TX_THREAD               thread_143_2;
671 static TX_THREAD               thread_144_2;
672 static TX_THREAD               thread_145_2;
673 static TX_THREAD               thread_146_2;
674 static TX_THREAD               thread_147_2;
675 static TX_THREAD               thread_148_2;
676 static TX_THREAD               thread_149_2;
677 static TX_THREAD               thread_150_2;
678 static TX_THREAD               thread_151_2;
679 static TX_THREAD               thread_152_2;
680 static TX_THREAD               thread_153_2;
681 static TX_THREAD               thread_154_2;
682 static TX_THREAD               thread_155_2;
683 static TX_THREAD               thread_156_2;
684 static TX_THREAD               thread_157_2;
685 static TX_THREAD               thread_158_2;
686 static TX_THREAD               thread_159_2;
687 static TX_THREAD               thread_160_2;
688 static TX_THREAD               thread_161_2;
689 static TX_THREAD               thread_162_2;
690 static TX_THREAD               thread_163_2;
691 static TX_THREAD               thread_164_2;
692 static TX_THREAD               thread_165_2;
693 static TX_THREAD               thread_166_2;
694 static TX_THREAD               thread_167_2;
695 static TX_THREAD               thread_168_2;
696 static TX_THREAD               thread_169_2;
697 static TX_THREAD               thread_170_2;
698 static TX_THREAD               thread_171_2;
699 static TX_THREAD               thread_172_2;
700 static TX_THREAD               thread_173_2;
701 static TX_THREAD               thread_174_2;
702 static TX_THREAD               thread_175_2;
703 static TX_THREAD               thread_176_2;
704 static TX_THREAD               thread_177_2;
705 static TX_THREAD               thread_178_2;
706 static TX_THREAD               thread_179_2;
707 static TX_THREAD               thread_180_2;
708 static TX_THREAD               thread_181_2;
709 static TX_THREAD               thread_182_2;
710 static TX_THREAD               thread_183_2;
711 static TX_THREAD               thread_184_2;
712 static TX_THREAD               thread_185_2;
713 static TX_THREAD               thread_186_2;
714 static TX_THREAD               thread_187_2;
715 static TX_THREAD               thread_188_2;
716 static TX_THREAD               thread_189_2;
717 static TX_THREAD               thread_190_2;
718 static TX_THREAD               thread_191_2;
719 static TX_THREAD               thread_192_2;
720 static TX_THREAD               thread_193_2;
721 static TX_THREAD               thread_194_2;
722 static TX_THREAD               thread_195_2;
723 static TX_THREAD               thread_196_2;
724 static TX_THREAD               thread_197_2;
725 static TX_THREAD               thread_198_2;
726 static TX_THREAD               thread_199_2;
727 static TX_THREAD               thread_200_2;
728 static TX_THREAD               thread_201_2;
729 static TX_THREAD               thread_202_2;
730 static TX_THREAD               thread_203_2;
731 static TX_THREAD               thread_204_2;
732 static TX_THREAD               thread_205_2;
733 static TX_THREAD               thread_206_2;
734 static TX_THREAD               thread_207_2;
735 static TX_THREAD               thread_208_2;
736 static TX_THREAD               thread_209_2;
737 static TX_THREAD               thread_210_2;
738 static TX_THREAD               thread_211_2;
739 static TX_THREAD               thread_212_2;
740 static TX_THREAD               thread_213_2;
741 static TX_THREAD               thread_214_2;
742 static TX_THREAD               thread_215_2;
743 static TX_THREAD               thread_216_2;
744 static TX_THREAD               thread_217_2;
745 static TX_THREAD               thread_218_2;
746 static TX_THREAD               thread_219_2;
747 static TX_THREAD               thread_220_2;
748 static TX_THREAD               thread_221_2;
749 static TX_THREAD               thread_222_2;
750 static TX_THREAD               thread_223_2;
751 static TX_THREAD               thread_224_2;
752 static TX_THREAD               thread_225_2;
753 static TX_THREAD               thread_226_2;
754 static TX_THREAD               thread_227_2;
755 static TX_THREAD               thread_228_2;
756 static TX_THREAD               thread_229_2;
757 static TX_THREAD               thread_230_2;
758 static TX_THREAD               thread_231_2;
759 static TX_THREAD               thread_232_2;
760 static TX_THREAD               thread_233_2;
761 static TX_THREAD               thread_234_2;
762 static TX_THREAD               thread_235_2;
763 static TX_THREAD               thread_236_2;
764 static TX_THREAD               thread_237_2;
765 static TX_THREAD               thread_238_2;
766 static TX_THREAD               thread_239_2;
767 static TX_THREAD               thread_240_2;
768 static TX_THREAD               thread_241_2;
769 static TX_THREAD               thread_242_2;
770 static TX_THREAD               thread_243_2;
771 static TX_THREAD               thread_244_2;
772 static TX_THREAD               thread_245_2;
773 static TX_THREAD               thread_246_2;
774 static TX_THREAD               thread_247_2;
775 static TX_THREAD               thread_248_2;
776 static TX_THREAD               thread_249_2;
777 static TX_THREAD               thread_250_2;
778 static TX_THREAD               thread_251_2;
779 static TX_THREAD               thread_252_2;
780 static TX_THREAD               thread_253_2;
781 static TX_THREAD               thread_254_2;
782 static TX_THREAD               thread_255_2;
783 
784 static TX_THREAD               thread_0_3;
785 static TX_THREAD               thread_1_3;
786 static TX_THREAD               thread_2_3;
787 static TX_THREAD               thread_3_3;
788 static TX_THREAD               thread_4_3;
789 static TX_THREAD               thread_5_3;
790 static TX_THREAD               thread_6_3;
791 static TX_THREAD               thread_7_3;
792 static TX_THREAD               thread_8_3;
793 static TX_THREAD               thread_9_3;
794 static TX_THREAD               thread_10_3;
795 static TX_THREAD               thread_11_3;
796 static TX_THREAD               thread_12_3;
797 static TX_THREAD               thread_13_3;
798 static TX_THREAD               thread_14_3;
799 static TX_THREAD               thread_15_3;
800 static TX_THREAD               thread_16_3;
801 static TX_THREAD               thread_17_3;
802 static TX_THREAD               thread_18_3;
803 static TX_THREAD               thread_19_3;
804 static TX_THREAD               thread_20_3;
805 static TX_THREAD               thread_21_3;
806 static TX_THREAD               thread_22_3;
807 static TX_THREAD               thread_23_3;
808 static TX_THREAD               thread_24_3;
809 static TX_THREAD               thread_25_3;
810 static TX_THREAD               thread_26_3;
811 static TX_THREAD               thread_27_3;
812 static TX_THREAD               thread_28_3;
813 static TX_THREAD               thread_29_3;
814 static TX_THREAD               thread_30_3;
815 static TX_THREAD               thread_31_3;
816 static TX_THREAD               thread_32_3;
817 static TX_THREAD               thread_33_3;
818 static TX_THREAD               thread_34_3;
819 static TX_THREAD               thread_35_3;
820 static TX_THREAD               thread_36_3;
821 static TX_THREAD               thread_37_3;
822 static TX_THREAD               thread_38_3;
823 static TX_THREAD               thread_39_3;
824 static TX_THREAD               thread_40_3;
825 static TX_THREAD               thread_41_3;
826 static TX_THREAD               thread_42_3;
827 static TX_THREAD               thread_43_3;
828 static TX_THREAD               thread_44_3;
829 static TX_THREAD               thread_45_3;
830 static TX_THREAD               thread_46_3;
831 static TX_THREAD               thread_47_3;
832 static TX_THREAD               thread_48_3;
833 static TX_THREAD               thread_49_3;
834 static TX_THREAD               thread_50_3;
835 static TX_THREAD               thread_51_3;
836 static TX_THREAD               thread_52_3;
837 static TX_THREAD               thread_53_3;
838 static TX_THREAD               thread_54_3;
839 static TX_THREAD               thread_55_3;
840 static TX_THREAD               thread_56_3;
841 static TX_THREAD               thread_57_3;
842 static TX_THREAD               thread_58_3;
843 static TX_THREAD               thread_59_3;
844 static TX_THREAD               thread_60_3;
845 static TX_THREAD               thread_61_3;
846 static TX_THREAD               thread_62_3;
847 static TX_THREAD               thread_63_3;
848 static TX_THREAD               thread_64_3;
849 static TX_THREAD               thread_65_3;
850 static TX_THREAD               thread_66_3;
851 static TX_THREAD               thread_67_3;
852 static TX_THREAD               thread_68_3;
853 static TX_THREAD               thread_69_3;
854 static TX_THREAD               thread_70_3;
855 static TX_THREAD               thread_71_3;
856 static TX_THREAD               thread_72_3;
857 static TX_THREAD               thread_73_3;
858 static TX_THREAD               thread_74_3;
859 static TX_THREAD               thread_75_3;
860 static TX_THREAD               thread_76_3;
861 static TX_THREAD               thread_77_3;
862 static TX_THREAD               thread_78_3;
863 static TX_THREAD               thread_79_3;
864 static TX_THREAD               thread_80_3;
865 static TX_THREAD               thread_81_3;
866 static TX_THREAD               thread_82_3;
867 static TX_THREAD               thread_83_3;
868 static TX_THREAD               thread_84_3;
869 static TX_THREAD               thread_85_3;
870 static TX_THREAD               thread_86_3;
871 static TX_THREAD               thread_87_3;
872 static TX_THREAD               thread_88_3;
873 static TX_THREAD               thread_89_3;
874 static TX_THREAD               thread_90_3;
875 static TX_THREAD               thread_91_3;
876 static TX_THREAD               thread_92_3;
877 static TX_THREAD               thread_93_3;
878 static TX_THREAD               thread_94_3;
879 static TX_THREAD               thread_95_3;
880 static TX_THREAD               thread_96_3;
881 static TX_THREAD               thread_97_3;
882 static TX_THREAD               thread_98_3;
883 static TX_THREAD               thread_99_3;
884 static TX_THREAD               thread_100_3;
885 static TX_THREAD               thread_101_3;
886 static TX_THREAD               thread_102_3;
887 static TX_THREAD               thread_103_3;
888 static TX_THREAD               thread_104_3;
889 static TX_THREAD               thread_105_3;
890 static TX_THREAD               thread_106_3;
891 static TX_THREAD               thread_107_3;
892 static TX_THREAD               thread_108_3;
893 static TX_THREAD               thread_109_3;
894 static TX_THREAD               thread_110_3;
895 static TX_THREAD               thread_111_3;
896 static TX_THREAD               thread_112_3;
897 static TX_THREAD               thread_113_3;
898 static TX_THREAD               thread_114_3;
899 static TX_THREAD               thread_115_3;
900 static TX_THREAD               thread_116_3;
901 static TX_THREAD               thread_117_3;
902 static TX_THREAD               thread_118_3;
903 static TX_THREAD               thread_119_3;
904 static TX_THREAD               thread_120_3;
905 static TX_THREAD               thread_121_3;
906 static TX_THREAD               thread_122_3;
907 static TX_THREAD               thread_123_3;
908 static TX_THREAD               thread_124_3;
909 static TX_THREAD               thread_125_3;
910 static TX_THREAD               thread_126_3;
911 static TX_THREAD               thread_127_3;
912 static TX_THREAD               thread_128_3;
913 static TX_THREAD               thread_129_3;
914 static TX_THREAD               thread_130_3;
915 static TX_THREAD               thread_131_3;
916 static TX_THREAD               thread_132_3;
917 static TX_THREAD               thread_133_3;
918 static TX_THREAD               thread_134_3;
919 static TX_THREAD               thread_135_3;
920 static TX_THREAD               thread_136_3;
921 static TX_THREAD               thread_137_3;
922 static TX_THREAD               thread_138_3;
923 static TX_THREAD               thread_139_3;
924 static TX_THREAD               thread_140_3;
925 static TX_THREAD               thread_141_3;
926 static TX_THREAD               thread_142_3;
927 static TX_THREAD               thread_143_3;
928 static TX_THREAD               thread_144_3;
929 static TX_THREAD               thread_145_3;
930 static TX_THREAD               thread_146_3;
931 static TX_THREAD               thread_147_3;
932 static TX_THREAD               thread_148_3;
933 static TX_THREAD               thread_149_3;
934 static TX_THREAD               thread_150_3;
935 static TX_THREAD               thread_151_3;
936 static TX_THREAD               thread_152_3;
937 static TX_THREAD               thread_153_3;
938 static TX_THREAD               thread_154_3;
939 static TX_THREAD               thread_155_3;
940 static TX_THREAD               thread_156_3;
941 static TX_THREAD               thread_157_3;
942 static TX_THREAD               thread_158_3;
943 static TX_THREAD               thread_159_3;
944 static TX_THREAD               thread_160_3;
945 static TX_THREAD               thread_161_3;
946 static TX_THREAD               thread_162_3;
947 static TX_THREAD               thread_163_3;
948 static TX_THREAD               thread_164_3;
949 static TX_THREAD               thread_165_3;
950 static TX_THREAD               thread_166_3;
951 static TX_THREAD               thread_167_3;
952 static TX_THREAD               thread_168_3;
953 static TX_THREAD               thread_169_3;
954 static TX_THREAD               thread_170_3;
955 static TX_THREAD               thread_171_3;
956 static TX_THREAD               thread_172_3;
957 static TX_THREAD               thread_173_3;
958 static TX_THREAD               thread_174_3;
959 static TX_THREAD               thread_175_3;
960 static TX_THREAD               thread_176_3;
961 static TX_THREAD               thread_177_3;
962 static TX_THREAD               thread_178_3;
963 static TX_THREAD               thread_179_3;
964 static TX_THREAD               thread_180_3;
965 static TX_THREAD               thread_181_3;
966 static TX_THREAD               thread_182_3;
967 static TX_THREAD               thread_183_3;
968 static TX_THREAD               thread_184_3;
969 static TX_THREAD               thread_185_3;
970 static TX_THREAD               thread_186_3;
971 static TX_THREAD               thread_187_3;
972 static TX_THREAD               thread_188_3;
973 static TX_THREAD               thread_189_3;
974 static TX_THREAD               thread_190_3;
975 static TX_THREAD               thread_191_3;
976 static TX_THREAD               thread_192_3;
977 static TX_THREAD               thread_193_3;
978 static TX_THREAD               thread_194_3;
979 static TX_THREAD               thread_195_3;
980 static TX_THREAD               thread_196_3;
981 static TX_THREAD               thread_197_3;
982 static TX_THREAD               thread_198_3;
983 static TX_THREAD               thread_199_3;
984 static TX_THREAD               thread_200_3;
985 static TX_THREAD               thread_201_3;
986 static TX_THREAD               thread_202_3;
987 static TX_THREAD               thread_203_3;
988 static TX_THREAD               thread_204_3;
989 static TX_THREAD               thread_205_3;
990 static TX_THREAD               thread_206_3;
991 static TX_THREAD               thread_207_3;
992 static TX_THREAD               thread_208_3;
993 static TX_THREAD               thread_209_3;
994 static TX_THREAD               thread_210_3;
995 static TX_THREAD               thread_211_3;
996 static TX_THREAD               thread_212_3;
997 static TX_THREAD               thread_213_3;
998 static TX_THREAD               thread_214_3;
999 static TX_THREAD               thread_215_3;
1000 static TX_THREAD               thread_216_3;
1001 static TX_THREAD               thread_217_3;
1002 static TX_THREAD               thread_218_3;
1003 static TX_THREAD               thread_219_3;
1004 static TX_THREAD               thread_220_3;
1005 static TX_THREAD               thread_221_3;
1006 static TX_THREAD               thread_222_3;
1007 static TX_THREAD               thread_223_3;
1008 static TX_THREAD               thread_224_3;
1009 static TX_THREAD               thread_225_3;
1010 static TX_THREAD               thread_226_3;
1011 static TX_THREAD               thread_227_3;
1012 static TX_THREAD               thread_228_3;
1013 static TX_THREAD               thread_229_3;
1014 static TX_THREAD               thread_230_3;
1015 static TX_THREAD               thread_231_3;
1016 static TX_THREAD               thread_232_3;
1017 static TX_THREAD               thread_233_3;
1018 static TX_THREAD               thread_234_3;
1019 static TX_THREAD               thread_235_3;
1020 static TX_THREAD               thread_236_3;
1021 static TX_THREAD               thread_237_3;
1022 static TX_THREAD               thread_238_3;
1023 static TX_THREAD               thread_239_3;
1024 static TX_THREAD               thread_240_3;
1025 static TX_THREAD               thread_241_3;
1026 static TX_THREAD               thread_242_3;
1027 static TX_THREAD               thread_243_3;
1028 static TX_THREAD               thread_244_3;
1029 static TX_THREAD               thread_245_3;
1030 static TX_THREAD               thread_246_3;
1031 static TX_THREAD               thread_247_3;
1032 static TX_THREAD               thread_248_3;
1033 static TX_THREAD               thread_249_3;
1034 static TX_THREAD               thread_250_3;
1035 static TX_THREAD               thread_251_3;
1036 static TX_THREAD               thread_252_3;
1037 static TX_THREAD               thread_253_3;
1038 static TX_THREAD               thread_254_3;
1039 static TX_THREAD               thread_255_3;
1040 
1041 /* Define test array.  */
1042 
1043 static TX_THREAD   *_smp_randomized_source_array[] = {
1044 {&thread_0},
1045 {&thread_1},
1046 {&thread_2},
1047 {&thread_3},
1048 {&thread_4},
1049 {&thread_5},
1050 {&thread_6},
1051 {&thread_7},
1052 {&thread_8},
1053 {&thread_9},
1054 {&thread_10},
1055 {&thread_11},
1056 {&thread_12},
1057 {&thread_13},
1058 {&thread_14},
1059 {&thread_15},
1060 {&thread_16},
1061 {&thread_17},
1062 {&thread_18},
1063 {&thread_19},
1064 {&thread_20},
1065 {&thread_21},
1066 {&thread_22},
1067 {&thread_23},
1068 {&thread_24},
1069 {&thread_25},
1070 {&thread_26},
1071 {&thread_27},
1072 {&thread_28},
1073 {&thread_29},
1074 {&thread_30},
1075 {&thread_31},
1076 {&thread_32},
1077 {&thread_33},
1078 {&thread_34},
1079 {&thread_35},
1080 {&thread_36},
1081 {&thread_37},
1082 {&thread_38},
1083 {&thread_39},
1084 {&thread_40},
1085 {&thread_41},
1086 {&thread_42},
1087 {&thread_43},
1088 {&thread_44},
1089 {&thread_45},
1090 {&thread_46},
1091 {&thread_47},
1092 {&thread_48},
1093 {&thread_49},
1094 {&thread_50},
1095 {&thread_51},
1096 {&thread_52},
1097 {&thread_53},
1098 {&thread_54},
1099 {&thread_55},
1100 {&thread_56},
1101 {&thread_57},
1102 {&thread_58},
1103 {&thread_59},
1104 {&thread_60},
1105 {&thread_61},
1106 {&thread_62},
1107 {&thread_63},
1108 {&thread_64},
1109 {&thread_65},
1110 {&thread_66},
1111 {&thread_67},
1112 {&thread_68},
1113 {&thread_69},
1114 {&thread_70},
1115 {&thread_71},
1116 {&thread_72},
1117 {&thread_73},
1118 {&thread_74},
1119 {&thread_75},
1120 {&thread_76},
1121 {&thread_77},
1122 {&thread_78},
1123 {&thread_79},
1124 {&thread_80},
1125 {&thread_81},
1126 {&thread_82},
1127 {&thread_83},
1128 {&thread_84},
1129 {&thread_85},
1130 {&thread_86},
1131 {&thread_87},
1132 {&thread_88},
1133 {&thread_89},
1134 {&thread_90},
1135 {&thread_91},
1136 {&thread_92},
1137 {&thread_93},
1138 {&thread_94},
1139 {&thread_95},
1140 {&thread_96},
1141 {&thread_97},
1142 {&thread_98},
1143 {&thread_99},
1144 {&thread_100},
1145 {&thread_101},
1146 {&thread_102},
1147 {&thread_103},
1148 {&thread_104},
1149 {&thread_105},
1150 {&thread_106},
1151 {&thread_107},
1152 {&thread_108},
1153 {&thread_109},
1154 {&thread_110},
1155 {&thread_111},
1156 {&thread_112},
1157 {&thread_113},
1158 {&thread_114},
1159 {&thread_115},
1160 {&thread_116},
1161 {&thread_117},
1162 {&thread_118},
1163 {&thread_119},
1164 {&thread_120},
1165 {&thread_121},
1166 {&thread_122},
1167 {&thread_123},
1168 {&thread_124},
1169 {&thread_125},
1170 {&thread_126},
1171 {&thread_127},
1172 {&thread_128},
1173 {&thread_129},
1174 {&thread_130},
1175 {&thread_131},
1176 {&thread_132},
1177 {&thread_133},
1178 {&thread_134},
1179 {&thread_135},
1180 {&thread_136},
1181 {&thread_137},
1182 {&thread_138},
1183 {&thread_139},
1184 {&thread_140},
1185 {&thread_141},
1186 {&thread_142},
1187 {&thread_143},
1188 {&thread_144},
1189 {&thread_145},
1190 {&thread_146},
1191 {&thread_147},
1192 {&thread_148},
1193 {&thread_149},
1194 {&thread_150},
1195 {&thread_151},
1196 {&thread_152},
1197 {&thread_153},
1198 {&thread_154},
1199 {&thread_155},
1200 {&thread_156},
1201 {&thread_157},
1202 {&thread_158},
1203 {&thread_159},
1204 {&thread_160},
1205 {&thread_161},
1206 {&thread_162},
1207 {&thread_163},
1208 {&thread_164},
1209 {&thread_165},
1210 {&thread_166},
1211 {&thread_167},
1212 {&thread_168},
1213 {&thread_169},
1214 {&thread_170},
1215 {&thread_171},
1216 {&thread_172},
1217 {&thread_173},
1218 {&thread_174},
1219 {&thread_175},
1220 {&thread_176},
1221 {&thread_177},
1222 {&thread_178},
1223 {&thread_179},
1224 {&thread_180},
1225 {&thread_181},
1226 {&thread_182},
1227 {&thread_183},
1228 {&thread_184},
1229 {&thread_185},
1230 {&thread_186},
1231 {&thread_187},
1232 {&thread_188},
1233 {&thread_189},
1234 {&thread_190},
1235 {&thread_191},
1236 {&thread_192},
1237 {&thread_193},
1238 {&thread_194},
1239 {&thread_195},
1240 {&thread_196},
1241 {&thread_197},
1242 {&thread_198},
1243 {&thread_199},
1244 {&thread_200},
1245 {&thread_201},
1246 {&thread_202},
1247 {&thread_203},
1248 {&thread_204},
1249 {&thread_205},
1250 {&thread_206},
1251 {&thread_207},
1252 {&thread_208},
1253 {&thread_209},
1254 {&thread_210},
1255 {&thread_211},
1256 {&thread_212},
1257 {&thread_213},
1258 {&thread_214},
1259 {&thread_215},
1260 {&thread_216},
1261 {&thread_217},
1262 {&thread_218},
1263 {&thread_219},
1264 {&thread_220},
1265 {&thread_221},
1266 {&thread_222},
1267 {&thread_223},
1268 {&thread_224},
1269 {&thread_225},
1270 {&thread_226},
1271 {&thread_227},
1272 {&thread_228},
1273 {&thread_229},
1274 {&thread_230},
1275 {&thread_231},
1276 {&thread_232},
1277 {&thread_233},
1278 {&thread_234},
1279 {&thread_235},
1280 {&thread_236},
1281 {&thread_237},
1282 {&thread_238},
1283 {&thread_239},
1284 {&thread_240},
1285 {&thread_241},
1286 {&thread_242},
1287 {&thread_243},
1288 {&thread_244},
1289 {&thread_245},
1290 {&thread_246},
1291 {&thread_247},
1292 {&thread_248},
1293 {&thread_249},
1294 {&thread_250},
1295 {&thread_251},
1296 {&thread_252},
1297 {&thread_253},
1298 {&thread_254},
1299 {&thread_255},
1300 
1301 {&thread_0_1},
1302 {&thread_1_1},
1303 {&thread_2_1},
1304 {&thread_3_1},
1305 {&thread_4_1},
1306 {&thread_5_1},
1307 {&thread_6_1},
1308 {&thread_7_1},
1309 {&thread_8_1},
1310 {&thread_9_1},
1311 {&thread_10_1},
1312 {&thread_11_1},
1313 {&thread_12_1},
1314 {&thread_13_1},
1315 {&thread_14_1},
1316 {&thread_15_1},
1317 {&thread_16_1},
1318 {&thread_17_1},
1319 {&thread_18_1},
1320 {&thread_19_1},
1321 {&thread_20_1},
1322 {&thread_21_1},
1323 {&thread_22_1},
1324 {&thread_23_1},
1325 {&thread_24_1},
1326 {&thread_25_1},
1327 {&thread_26_1},
1328 {&thread_27_1},
1329 {&thread_28_1},
1330 {&thread_29_1},
1331 {&thread_30_1},
1332 {&thread_31_1},
1333 {&thread_32_1},
1334 {&thread_33_1},
1335 {&thread_34_1},
1336 {&thread_35_1},
1337 {&thread_36_1},
1338 {&thread_37_1},
1339 {&thread_38_1},
1340 {&thread_39_1},
1341 {&thread_40_1},
1342 {&thread_41_1},
1343 {&thread_42_1},
1344 {&thread_43_1},
1345 {&thread_44_1},
1346 {&thread_45_1},
1347 {&thread_46_1},
1348 {&thread_47_1},
1349 {&thread_48_1},
1350 {&thread_49_1},
1351 {&thread_50_1},
1352 {&thread_51_1},
1353 {&thread_52_1},
1354 {&thread_53_1},
1355 {&thread_54_1},
1356 {&thread_55_1},
1357 {&thread_56_1},
1358 {&thread_57_1},
1359 {&thread_58_1},
1360 {&thread_59_1},
1361 {&thread_60_1},
1362 {&thread_61_1},
1363 {&thread_62_1},
1364 {&thread_63_1},
1365 {&thread_64_1},
1366 {&thread_65_1},
1367 {&thread_66_1},
1368 {&thread_67_1},
1369 {&thread_68_1},
1370 {&thread_69_1},
1371 {&thread_70_1},
1372 {&thread_71_1},
1373 {&thread_72_1},
1374 {&thread_73_1},
1375 {&thread_74_1},
1376 {&thread_75_1},
1377 {&thread_76_1},
1378 {&thread_77_1},
1379 {&thread_78_1},
1380 {&thread_79_1},
1381 {&thread_80_1},
1382 {&thread_81_1},
1383 {&thread_82_1},
1384 {&thread_83_1},
1385 {&thread_84_1},
1386 {&thread_85_1},
1387 {&thread_86_1},
1388 {&thread_87_1},
1389 {&thread_88_1},
1390 {&thread_89_1},
1391 {&thread_90_1},
1392 {&thread_91_1},
1393 {&thread_92_1},
1394 {&thread_93_1},
1395 {&thread_94_1},
1396 {&thread_95_1},
1397 {&thread_96_1},
1398 {&thread_97_1},
1399 {&thread_98_1},
1400 {&thread_99_1},
1401 {&thread_100_1},
1402 {&thread_101_1},
1403 {&thread_102_1},
1404 {&thread_103_1},
1405 {&thread_104_1},
1406 {&thread_105_1},
1407 {&thread_106_1},
1408 {&thread_107_1},
1409 {&thread_108_1},
1410 {&thread_109_1},
1411 {&thread_110_1},
1412 {&thread_111_1},
1413 {&thread_112_1},
1414 {&thread_113_1},
1415 {&thread_114_1},
1416 {&thread_115_1},
1417 {&thread_116_1},
1418 {&thread_117_1},
1419 {&thread_118_1},
1420 {&thread_119_1},
1421 {&thread_120_1},
1422 {&thread_121_1},
1423 {&thread_122_1},
1424 {&thread_123_1},
1425 {&thread_124_1},
1426 {&thread_125_1},
1427 {&thread_126_1},
1428 {&thread_127_1},
1429 {&thread_128_1},
1430 {&thread_129_1},
1431 {&thread_130_1},
1432 {&thread_131_1},
1433 {&thread_132_1},
1434 {&thread_133_1},
1435 {&thread_134_1},
1436 {&thread_135_1},
1437 {&thread_136_1},
1438 {&thread_137_1},
1439 {&thread_138_1},
1440 {&thread_139_1},
1441 {&thread_140_1},
1442 {&thread_141_1},
1443 {&thread_142_1},
1444 {&thread_143_1},
1445 {&thread_144_1},
1446 {&thread_145_1},
1447 {&thread_146_1},
1448 {&thread_147_1},
1449 {&thread_148_1},
1450 {&thread_149_1},
1451 {&thread_150_1},
1452 {&thread_151_1},
1453 {&thread_152_1},
1454 {&thread_153_1},
1455 {&thread_154_1},
1456 {&thread_155_1},
1457 {&thread_156_1},
1458 {&thread_157_1},
1459 {&thread_158_1},
1460 {&thread_159_1},
1461 {&thread_160_1},
1462 {&thread_161_1},
1463 {&thread_162_1},
1464 {&thread_163_1},
1465 {&thread_164_1},
1466 {&thread_165_1},
1467 {&thread_166_1},
1468 {&thread_167_1},
1469 {&thread_168_1},
1470 {&thread_169_1},
1471 {&thread_170_1},
1472 {&thread_171_1},
1473 {&thread_172_1},
1474 {&thread_173_1},
1475 {&thread_174_1},
1476 {&thread_175_1},
1477 {&thread_176_1},
1478 {&thread_177_1},
1479 {&thread_178_1},
1480 {&thread_179_1},
1481 {&thread_180_1},
1482 {&thread_181_1},
1483 {&thread_182_1},
1484 {&thread_183_1},
1485 {&thread_184_1},
1486 {&thread_185_1},
1487 {&thread_186_1},
1488 {&thread_187_1},
1489 {&thread_188_1},
1490 {&thread_189_1},
1491 {&thread_190_1},
1492 {&thread_191_1},
1493 {&thread_192_1},
1494 {&thread_193_1},
1495 {&thread_194_1},
1496 {&thread_195_1},
1497 {&thread_196_1},
1498 {&thread_197_1},
1499 {&thread_198_1},
1500 {&thread_199_1},
1501 {&thread_200_1},
1502 {&thread_201_1},
1503 {&thread_202_1},
1504 {&thread_203_1},
1505 {&thread_204_1},
1506 {&thread_205_1},
1507 {&thread_206_1},
1508 {&thread_207_1},
1509 {&thread_208_1},
1510 {&thread_209_1},
1511 {&thread_210_1},
1512 {&thread_211_1},
1513 {&thread_212_1},
1514 {&thread_213_1},
1515 {&thread_214_1},
1516 {&thread_215_1},
1517 {&thread_216_1},
1518 {&thread_217_1},
1519 {&thread_218_1},
1520 {&thread_219_1},
1521 {&thread_220_1},
1522 {&thread_221_1},
1523 {&thread_222_1},
1524 {&thread_223_1},
1525 {&thread_224_1},
1526 {&thread_225_1},
1527 {&thread_226_1},
1528 {&thread_227_1},
1529 {&thread_228_1},
1530 {&thread_229_1},
1531 {&thread_230_1},
1532 {&thread_231_1},
1533 {&thread_232_1},
1534 {&thread_233_1},
1535 {&thread_234_1},
1536 {&thread_235_1},
1537 {&thread_236_1},
1538 {&thread_237_1},
1539 {&thread_238_1},
1540 {&thread_239_1},
1541 {&thread_240_1},
1542 {&thread_241_1},
1543 {&thread_242_1},
1544 {&thread_243_1},
1545 {&thread_244_1},
1546 {&thread_245_1},
1547 {&thread_246_1},
1548 {&thread_247_1},
1549 {&thread_248_1},
1550 {&thread_249_1},
1551 {&thread_250_1},
1552 {&thread_251_1},
1553 {&thread_252_1},
1554 {&thread_253_1},
1555 {&thread_254_1},
1556 {&thread_255_1},
1557 
1558 {&thread_0_2},
1559 {&thread_1_2},
1560 {&thread_2_2},
1561 {&thread_3_2},
1562 {&thread_4_2},
1563 {&thread_5_2},
1564 {&thread_6_2},
1565 {&thread_7_2},
1566 {&thread_8_2},
1567 {&thread_9_2},
1568 {&thread_10_2},
1569 {&thread_11_2},
1570 {&thread_12_2},
1571 {&thread_13_2},
1572 {&thread_14_2},
1573 {&thread_15_2},
1574 {&thread_16_2},
1575 {&thread_17_2},
1576 {&thread_18_2},
1577 {&thread_19_2},
1578 {&thread_20_2},
1579 {&thread_21_2},
1580 {&thread_22_2},
1581 {&thread_23_2},
1582 {&thread_24_2},
1583 {&thread_25_2},
1584 {&thread_26_2},
1585 {&thread_27_2},
1586 {&thread_28_2},
1587 {&thread_29_2},
1588 {&thread_30_2},
1589 {&thread_31_2},
1590 {&thread_32_2},
1591 {&thread_33_2},
1592 {&thread_34_2},
1593 {&thread_35_2},
1594 {&thread_36_2},
1595 {&thread_37_2},
1596 {&thread_38_2},
1597 {&thread_39_2},
1598 {&thread_40_2},
1599 {&thread_41_2},
1600 {&thread_42_2},
1601 {&thread_43_2},
1602 {&thread_44_2},
1603 {&thread_45_2},
1604 {&thread_46_2},
1605 {&thread_47_2},
1606 {&thread_48_2},
1607 {&thread_49_2},
1608 {&thread_50_2},
1609 {&thread_51_2},
1610 {&thread_52_2},
1611 {&thread_53_2},
1612 {&thread_54_2},
1613 {&thread_55_2},
1614 {&thread_56_2},
1615 {&thread_57_2},
1616 {&thread_58_2},
1617 {&thread_59_2},
1618 {&thread_60_2},
1619 {&thread_61_2},
1620 {&thread_62_2},
1621 {&thread_63_2},
1622 {&thread_64_2},
1623 {&thread_65_2},
1624 {&thread_66_2},
1625 {&thread_67_2},
1626 {&thread_68_2},
1627 {&thread_69_2},
1628 {&thread_70_2},
1629 {&thread_71_2},
1630 {&thread_72_2},
1631 {&thread_73_2},
1632 {&thread_74_2},
1633 {&thread_75_2},
1634 {&thread_76_2},
1635 {&thread_77_2},
1636 {&thread_78_2},
1637 {&thread_79_2},
1638 {&thread_80_2},
1639 {&thread_81_2},
1640 {&thread_82_2},
1641 {&thread_83_2},
1642 {&thread_84_2},
1643 {&thread_85_2},
1644 {&thread_86_2},
1645 {&thread_87_2},
1646 {&thread_88_2},
1647 {&thread_89_2},
1648 {&thread_90_2},
1649 {&thread_91_2},
1650 {&thread_92_2},
1651 {&thread_93_2},
1652 {&thread_94_2},
1653 {&thread_95_2},
1654 {&thread_96_2},
1655 {&thread_97_2},
1656 {&thread_98_2},
1657 {&thread_99_2},
1658 {&thread_100_2},
1659 {&thread_101_2},
1660 {&thread_102_2},
1661 {&thread_103_2},
1662 {&thread_104_2},
1663 {&thread_105_2},
1664 {&thread_106_2},
1665 {&thread_107_2},
1666 {&thread_108_2},
1667 {&thread_109_2},
1668 {&thread_110_2},
1669 {&thread_111_2},
1670 {&thread_112_2},
1671 {&thread_113_2},
1672 {&thread_114_2},
1673 {&thread_115_2},
1674 {&thread_116_2},
1675 {&thread_117_2},
1676 {&thread_118_2},
1677 {&thread_119_2},
1678 {&thread_120_2},
1679 {&thread_121_2},
1680 {&thread_122_2},
1681 {&thread_123_2},
1682 {&thread_124_2},
1683 {&thread_125_2},
1684 {&thread_126_2},
1685 {&thread_127_2},
1686 {&thread_128_2},
1687 {&thread_129_2},
1688 {&thread_130_2},
1689 {&thread_131_2},
1690 {&thread_132_2},
1691 {&thread_133_2},
1692 {&thread_134_2},
1693 {&thread_135_2},
1694 {&thread_136_2},
1695 {&thread_137_2},
1696 {&thread_138_2},
1697 {&thread_139_2},
1698 {&thread_140_2},
1699 {&thread_141_2},
1700 {&thread_142_2},
1701 {&thread_143_2},
1702 {&thread_144_2},
1703 {&thread_145_2},
1704 {&thread_146_2},
1705 {&thread_147_2},
1706 {&thread_148_2},
1707 {&thread_149_2},
1708 {&thread_150_2},
1709 {&thread_151_2},
1710 {&thread_152_2},
1711 {&thread_153_2},
1712 {&thread_154_2},
1713 {&thread_155_2},
1714 {&thread_156_2},
1715 {&thread_157_2},
1716 {&thread_158_2},
1717 {&thread_159_2},
1718 {&thread_160_2},
1719 {&thread_161_2},
1720 {&thread_162_2},
1721 {&thread_163_2},
1722 {&thread_164_2},
1723 {&thread_165_2},
1724 {&thread_166_2},
1725 {&thread_167_2},
1726 {&thread_168_2},
1727 {&thread_169_2},
1728 {&thread_170_2},
1729 {&thread_171_2},
1730 {&thread_172_2},
1731 {&thread_173_2},
1732 {&thread_174_2},
1733 {&thread_175_2},
1734 {&thread_176_2},
1735 {&thread_177_2},
1736 {&thread_178_2},
1737 {&thread_179_2},
1738 {&thread_180_2},
1739 {&thread_181_2},
1740 {&thread_182_2},
1741 {&thread_183_2},
1742 {&thread_184_2},
1743 {&thread_185_2},
1744 {&thread_186_2},
1745 {&thread_187_2},
1746 {&thread_188_2},
1747 {&thread_189_2},
1748 {&thread_190_2},
1749 {&thread_191_2},
1750 {&thread_192_2},
1751 {&thread_193_2},
1752 {&thread_194_2},
1753 {&thread_195_2},
1754 {&thread_196_2},
1755 {&thread_197_2},
1756 {&thread_198_2},
1757 {&thread_199_2},
1758 {&thread_200_2},
1759 {&thread_201_2},
1760 {&thread_202_2},
1761 {&thread_203_2},
1762 {&thread_204_2},
1763 {&thread_205_2},
1764 {&thread_206_2},
1765 {&thread_207_2},
1766 {&thread_208_2},
1767 {&thread_209_2},
1768 {&thread_210_2},
1769 {&thread_211_2},
1770 {&thread_212_2},
1771 {&thread_213_2},
1772 {&thread_214_2},
1773 {&thread_215_2},
1774 {&thread_216_2},
1775 {&thread_217_2},
1776 {&thread_218_2},
1777 {&thread_219_2},
1778 {&thread_220_2},
1779 {&thread_221_2},
1780 {&thread_222_2},
1781 {&thread_223_2},
1782 {&thread_224_2},
1783 {&thread_225_2},
1784 {&thread_226_2},
1785 {&thread_227_2},
1786 {&thread_228_2},
1787 {&thread_229_2},
1788 {&thread_230_2},
1789 {&thread_231_2},
1790 {&thread_232_2},
1791 {&thread_233_2},
1792 {&thread_234_2},
1793 {&thread_235_2},
1794 {&thread_236_2},
1795 {&thread_237_2},
1796 {&thread_238_2},
1797 {&thread_239_2},
1798 {&thread_240_2},
1799 {&thread_241_2},
1800 {&thread_242_2},
1801 {&thread_243_2},
1802 {&thread_244_2},
1803 {&thread_245_2},
1804 {&thread_246_2},
1805 {&thread_247_2},
1806 {&thread_248_2},
1807 {&thread_249_2},
1808 {&thread_250_2},
1809 {&thread_251_2},
1810 {&thread_252_2},
1811 {&thread_253_2},
1812 {&thread_254_2},
1813 {&thread_255_2},
1814 
1815 {&thread_0_3},
1816 {&thread_1_3},
1817 {&thread_2_3},
1818 {&thread_3_3},
1819 {&thread_4_3},
1820 {&thread_5_3},
1821 {&thread_6_3},
1822 {&thread_7_3},
1823 {&thread_8_3},
1824 {&thread_9_3},
1825 {&thread_10_3},
1826 {&thread_11_3},
1827 {&thread_12_3},
1828 {&thread_13_3},
1829 {&thread_14_3},
1830 {&thread_15_3},
1831 {&thread_16_3},
1832 {&thread_17_3},
1833 {&thread_18_3},
1834 {&thread_19_3},
1835 {&thread_20_3},
1836 {&thread_21_3},
1837 {&thread_22_3},
1838 {&thread_23_3},
1839 {&thread_24_3},
1840 {&thread_25_3},
1841 {&thread_26_3},
1842 {&thread_27_3},
1843 {&thread_28_3},
1844 {&thread_29_3},
1845 {&thread_30_3},
1846 {&thread_31_3},
1847 {&thread_32_3},
1848 {&thread_33_3},
1849 {&thread_34_3},
1850 {&thread_35_3},
1851 {&thread_36_3},
1852 {&thread_37_3},
1853 {&thread_38_3},
1854 {&thread_39_3},
1855 {&thread_40_3},
1856 {&thread_41_3},
1857 {&thread_42_3},
1858 {&thread_43_3},
1859 {&thread_44_3},
1860 {&thread_45_3},
1861 {&thread_46_3},
1862 {&thread_47_3},
1863 {&thread_48_3},
1864 {&thread_49_3},
1865 {&thread_50_3},
1866 {&thread_51_3},
1867 {&thread_52_3},
1868 {&thread_53_3},
1869 {&thread_54_3},
1870 {&thread_55_3},
1871 {&thread_56_3},
1872 {&thread_57_3},
1873 {&thread_58_3},
1874 {&thread_59_3},
1875 {&thread_60_3},
1876 {&thread_61_3},
1877 {&thread_62_3},
1878 {&thread_63_3},
1879 {&thread_64_3},
1880 {&thread_65_3},
1881 {&thread_66_3},
1882 {&thread_67_3},
1883 {&thread_68_3},
1884 {&thread_69_3},
1885 {&thread_70_3},
1886 {&thread_71_3},
1887 {&thread_72_3},
1888 {&thread_73_3},
1889 {&thread_74_3},
1890 {&thread_75_3},
1891 {&thread_76_3},
1892 {&thread_77_3},
1893 {&thread_78_3},
1894 {&thread_79_3},
1895 {&thread_80_3},
1896 {&thread_81_3},
1897 {&thread_82_3},
1898 {&thread_83_3},
1899 {&thread_84_3},
1900 {&thread_85_3},
1901 {&thread_86_3},
1902 {&thread_87_3},
1903 {&thread_88_3},
1904 {&thread_89_3},
1905 {&thread_90_3},
1906 {&thread_91_3},
1907 {&thread_92_3},
1908 {&thread_93_3},
1909 {&thread_94_3},
1910 {&thread_95_3},
1911 {&thread_96_3},
1912 {&thread_97_3},
1913 {&thread_98_3},
1914 {&thread_99_3},
1915 {&thread_100_3},
1916 {&thread_101_3},
1917 {&thread_102_3},
1918 {&thread_103_3},
1919 {&thread_104_3},
1920 {&thread_105_3},
1921 {&thread_106_3},
1922 {&thread_107_3},
1923 {&thread_108_3},
1924 {&thread_109_3},
1925 {&thread_110_3},
1926 {&thread_111_3},
1927 {&thread_112_3},
1928 {&thread_113_3},
1929 {&thread_114_3},
1930 {&thread_115_3},
1931 {&thread_116_3},
1932 {&thread_117_3},
1933 {&thread_118_3},
1934 {&thread_119_3},
1935 {&thread_120_3},
1936 {&thread_121_3},
1937 {&thread_122_3},
1938 {&thread_123_3},
1939 {&thread_124_3},
1940 {&thread_125_3},
1941 {&thread_126_3},
1942 {&thread_127_3},
1943 {&thread_128_3},
1944 {&thread_129_3},
1945 {&thread_130_3},
1946 {&thread_131_3},
1947 {&thread_132_3},
1948 {&thread_133_3},
1949 {&thread_134_3},
1950 {&thread_135_3},
1951 {&thread_136_3},
1952 {&thread_137_3},
1953 {&thread_138_3},
1954 {&thread_139_3},
1955 {&thread_140_3},
1956 {&thread_141_3},
1957 {&thread_142_3},
1958 {&thread_143_3},
1959 {&thread_144_3},
1960 {&thread_145_3},
1961 {&thread_146_3},
1962 {&thread_147_3},
1963 {&thread_148_3},
1964 {&thread_149_3},
1965 {&thread_150_3},
1966 {&thread_151_3},
1967 {&thread_152_3},
1968 {&thread_153_3},
1969 {&thread_154_3},
1970 {&thread_155_3},
1971 {&thread_156_3},
1972 {&thread_157_3},
1973 {&thread_158_3},
1974 {&thread_159_3},
1975 {&thread_160_3},
1976 {&thread_161_3},
1977 {&thread_162_3},
1978 {&thread_163_3},
1979 {&thread_164_3},
1980 {&thread_165_3},
1981 {&thread_166_3},
1982 {&thread_167_3},
1983 {&thread_168_3},
1984 {&thread_169_3},
1985 {&thread_170_3},
1986 {&thread_171_3},
1987 {&thread_172_3},
1988 {&thread_173_3},
1989 {&thread_174_3},
1990 {&thread_175_3},
1991 {&thread_176_3},
1992 {&thread_177_3},
1993 {&thread_178_3},
1994 {&thread_179_3},
1995 {&thread_180_3},
1996 {&thread_181_3},
1997 {&thread_182_3},
1998 {&thread_183_3},
1999 {&thread_184_3},
2000 {&thread_185_3},
2001 {&thread_186_3},
2002 {&thread_187_3},
2003 {&thread_188_3},
2004 {&thread_189_3},
2005 {&thread_190_3},
2006 {&thread_191_3},
2007 {&thread_192_3},
2008 {&thread_193_3},
2009 {&thread_194_3},
2010 {&thread_195_3},
2011 {&thread_196_3},
2012 {&thread_197_3},
2013 {&thread_198_3},
2014 {&thread_199_3},
2015 {&thread_200_3},
2016 {&thread_201_3},
2017 {&thread_202_3},
2018 {&thread_203_3},
2019 {&thread_204_3},
2020 {&thread_205_3},
2021 {&thread_206_3},
2022 {&thread_207_3},
2023 {&thread_208_3},
2024 {&thread_209_3},
2025 {&thread_210_3},
2026 {&thread_211_3},
2027 {&thread_212_3},
2028 {&thread_213_3},
2029 {&thread_214_3},
2030 {&thread_215_3},
2031 {&thread_216_3},
2032 {&thread_217_3},
2033 {&thread_218_3},
2034 {&thread_219_3},
2035 {&thread_220_3},
2036 {&thread_221_3},
2037 {&thread_222_3},
2038 {&thread_223_3},
2039 {&thread_224_3},
2040 {&thread_225_3},
2041 {&thread_226_3},
2042 {&thread_227_3},
2043 {&thread_228_3},
2044 {&thread_229_3},
2045 {&thread_230_3},
2046 {&thread_231_3},
2047 {&thread_232_3},
2048 {&thread_233_3},
2049 {&thread_234_3},
2050 {&thread_235_3},
2051 {&thread_236_3},
2052 {&thread_237_3},
2053 {&thread_238_3},
2054 {&thread_239_3},
2055 {&thread_240_3},
2056 {&thread_241_3},
2057 {&thread_242_3},
2058 {&thread_243_3},
2059 {&thread_244_3},
2060 {&thread_245_3},
2061 {&thread_246_3},
2062 {&thread_247_3},
2063 {&thread_248_3},
2064 {&thread_249_3},
2065 {&thread_250_3},
2066 {&thread_251_3},
2067 {&thread_252_3},
2068 {&thread_253_3},
2069 {&thread_254_3},
2070 {&thread_255_3}
2071 };
2072 
2073 /* Define the test array.  This used to store the randomized test.  */
2074 
2075 static TX_THREAD               *_smp_randomized_test_array[TX_THREAD_SMP_MAX_CORES*2];
2076 
2077 
2078 /* Define thread entry prototype. Since it won't be used it can be the same.  */
2079 
2080 static void    control_thread_entry(ULONG thread_input);
2081 static void    thread_entry(ULONG thread_input);
2082 
2083 
2084 /* Prototype for test control return.  */
2085 
2086 void  test_control_return(UINT status);
2087 
2088 
2089 
2090 static UINT    pass;
2091 static UINT    start_pass;
2092 static UINT    end_pass;
2093 
2094 
2095 /* Create a test control thread.  */
2096 
2097 static TX_THREAD    control_thread;
2098 
2099 
2100 
2101 /* Define what the initial system looks like.  */
2102 
2103 #ifdef CTEST
test_application_define(void * first_unused_memory)2104 void test_application_define(void *first_unused_memory)
2105 #else
2106 void    threadx_smp_random_resume_suspend_test(void *first_unused_memory)
2107 #endif
2108 {
2109 
2110 CHAR        *pointer;
2111 UINT        status;
2112 
2113     /* Put first available memory address into a character pointer.  */
2114     pointer =  (CHAR *) first_unused_memory;
2115 
2116     /* Create a control thread to run the test.  */
2117     status =  tx_thread_create(&control_thread, "control thread", control_thread_entry, 0,
2118             pointer, 1024,
2119             0, 0, TX_NO_TIME_SLICE, TX_AUTO_START);
2120 
2121     /* Check status.  */
2122     if (status != TX_SUCCESS)
2123     {
2124 
2125         printf("Running SMP Random Suspensions/Resumptions Test..................... ERROR #1\n");
2126         test_control_return(1);
2127     }
2128 }
2129 
2130 
control_thread_entry(ULONG thread_input)2131 static void    control_thread_entry(ULONG thread_input)
2132 {
2133 
2134 UINT        i, j;
2135 UINT        priority;
2136 UINT        source_index;
2137 UINT        successful_tests =  0;
2138 UINT        test_errors =  0;
2139 TX_THREAD   *thread_ptr;
2140 TX_THREAD   *current_thread;
2141 UINT        original_priority;
2142 UINT        status;
2143 
2144 
2145     /* Pickup the current thread pointer.  */
2146     current_thread =  tx_thread_identify();
2147 
2148     /* Loop to create all the threads.  */
2149     i =  0;
2150     priority =  0;
2151     status =  TX_SUCCESS;
2152     while (i < 1024)
2153     {
2154 
2155         /* Create each thread.  */
2156         status +=  tx_thread_create(_smp_randomized_source_array[i], "test thread", thread_entry, i,
2157 //            (void *) pointer, 512,
2158             malloc(1024), 1024,
2159             priority, priority, TX_NO_TIME_SLICE, TX_DONT_START);
2160 //        pointer =  pointer + 512;
2161 
2162         /* Check status.  */
2163         if (status != TX_SUCCESS)
2164         {
2165 
2166             printf("Running SMP Random Suspensions/Resumptions Test..................... ERROR #2\n");
2167             test_control_return(1);
2168             break;
2169         }
2170 
2171         /* Move to next entry/priority.  */
2172         i++;
2173         priority++;
2174 
2175         /* Should priority be reset?  */
2176 		if (priority >= TX_MAX_PRIORITIES)
2177 		{
2178 
2179 			/* Yes, reset the priority.  */
2180 			priority =  0;
2181 		}
2182     }
2183 
2184     /* Start random test.  */
2185     printf("Running SMP Random Suspensions/Resumptions Test..................... ");
2186 
2187     /* Clear system counters.  */
2188     pass =         0;
2189     start_pass =   0;
2190     end_pass =     start_pass + MAX_PASSES;
2191     do
2192     {
2193 
2194         /* Clear the randomized test array.  */
2195         for (i = 0; i < (TX_THREAD_SMP_MAX_CORES*2); i++)
2196         {
2197             _smp_randomized_test_array[i] = TX_NULL;
2198         }
2199 
2200         /* Build the randomized test array.  */
2201         for (i = 0; i < (TX_THREAD_SMP_MAX_CORES*2); i++)
2202         {
2203             do
2204             {
2205                 source_index =  (rand())%1024;
2206 
2207                 /* Determine if this index has repeated.  */
2208                 thread_ptr = _smp_randomized_source_array[source_index];
2209 
2210                 /* Is this thread already in the test array?  */
2211                 j =  0;
2212                 while (j < TX_THREAD_SMP_MAX_CORES*2)
2213                 {
2214                     /* Is the entry NULL?  */
2215                     if (_smp_randomized_test_array[j] == TX_NULL)
2216                     {
2217                         j =  (TX_THREAD_SMP_MAX_CORES*2);
2218                     }
2219 
2220                     /* Determine if we have a duplicate.  */
2221                     if (_smp_randomized_test_array[j] == thread_ptr)
2222 						thread_ptr =  TX_NULL;
2223 
2224                     j++;
2225                 }
2226 
2227              } while (thread_ptr == TX_NULL);
2228 
2229             /* Clear run counter.  */
2230             thread_ptr -> tx_thread_run_count =  0;
2231 
2232             /* Save the thread pointer.  */
2233             _smp_randomized_test_array[i] =  thread_ptr;
2234         }
2235 
2236         /* Now make all the random threads ready.  */
2237         for (i = 0; i < (TX_THREAD_SMP_MAX_CORES*2); i++)
2238         {
2239             status =  tx_thread_resume(_smp_randomized_test_array[i]);
2240 
2241             /* Check for an error.  */
2242             if (status != TX_SUCCESS)
2243             {
2244 
2245                 printf("ERROR #3\n");
2246                 test_control_return(1);
2247 				break;
2248             }
2249         }
2250 
2251         /* Check the status.  */
2252         if (status)
2253             break;
2254 
2255         /* Move to the lowest priority.  */
2256         status    +=  tx_thread_priority_change(current_thread, TX_MAX_PRIORITIES-1, &original_priority);
2257 		tx_thread_relinquish();
2258 
2259         /* At this point all the threads have run, or should have.  */
2260 
2261         /* Restore priority.  */
2262         status   +=  tx_thread_priority_change(current_thread, original_priority, &original_priority);
2263 
2264         /* Was there an error?  */
2265         if (status != TX_SUCCESS)
2266         {
2267 
2268              printf("ERROR #4\n");
2269              test_control_return(1);
2270              break;
2271         }
2272 
2273         /* Determine if all the threads in the the random sample ran.  */
2274         for (i = 0; i < (TX_THREAD_SMP_MAX_CORES*2); i++)
2275         {
2276 
2277             /* Pickup the thread pointer.  */
2278 			thread_ptr =  _smp_randomized_test_array[i];
2279 
2280             /* Check to see if each thread has run.  */
2281             if (thread_ptr -> tx_thread_run_count == 0)
2282             {
2283 
2284                 /* First, try to sleep to see if this helps!  */
2285                 tx_thread_sleep(1);
2286             }
2287 
2288 			/* Has the run count incremented?  */
2289             if (thread_ptr -> tx_thread_run_count == 0)
2290             {
2291 
2292 				 /* No, this thread didn't really run!  */
2293                  printf("ERROR #5\n");
2294                  test_control_return(1);
2295                  break;
2296             }
2297 
2298 			/* Make sure this thread suspended.  */
2299             while (thread_ptr -> tx_thread_state != TX_SUSPENDED)
2300             {
2301 				/* Wait for the thread to complete!  */
2302 				tx_thread_relinquish();
2303 			}
2304         }
2305 
2306         /* Increment the pass counter.  */
2307         pass++;
2308 
2309     } while (pass < end_pass);
2310 
2311     /* Test is successful!  */
2312     printf("SUCCESS!\n");
2313     test_control_return(0);
2314 }
2315 
2316 
thread_entry(ULONG id)2317 static void thread_entry(ULONG id)
2318 {
2319 
2320     /* While forever loop!  */
2321     while(1)
2322     {
2323 
2324         /* Suspend thread!  */
2325         tx_thread_suspend(_smp_randomized_source_array[id]);
2326     }
2327 }
2328 
2329 
2330