Changeset 445 for trunk/user/sort/sort.c
- Timestamp:
- May 29, 2018, 9:27:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/sort/sort.c
r444 r445 25 25 #include <stdlib.h> 26 26 #include <pthread.h> 27 #include <almos -mkh.h>27 #include <almosmkh.h> 28 28 29 29 #define ARRAY_LENGTH 0x400 // 1024 values … … 163 163 bubbleSort( array0, items, items * thread_uid ); 164 164 165 printf("\n[SORT] thread[%d] /stage 0 completed\n", thread_uid );165 printf("\n[SORT] thread[%d] : stage 0 completed\n", thread_uid ); 166 166 167 167 ///////////////////////////////// … … 177 177 if( (thread_uid & ((1<<i)-1)) == 0 ) 178 178 { 179 printf("\n[SORT] thread[%d] /stage %d start\n", thread_uid , i );179 printf("\n[SORT] thread[%d] : stage %d start\n", thread_uid , i ); 180 180 181 181 if((i % 2) == 1) // odd stage … … 197 197 items * thread_uid ); 198 198 199 printf("\n[SORT] thread[%d] /stage %d completed\n", thread_uid , i );199 printf("\n[SORT] thread[%d] : stage %d completed\n", thread_uid , i ); 200 200 } 201 201 … … 328 328 329 329 #if INTERACTIVE_MODE 330 idbg();330 // idbg(); 331 331 #endif 332 332 } … … 336 336 get_cycle( &cycle ); 337 337 printf("\n[SORT] main completes threads create at cycle %d\n", (unsigned int)cycle ); 338 339 // main run also the sort() function340 sort( &arg[main_uid] );341 338 342 339 #if INTERACTIVE_MODE … … 344 341 #endif 345 342 343 // the main thread run also the sort() function 344 sort( &arg[main_uid] ); 345 346 346 // Check result 347 347 int success = 1;
Note: See TracChangeset
for help on using the changeset viewer.