Changeset 445 for trunk/user/sort/sort.c


Ignore:
Timestamp:
May 29, 2018, 9:27:23 AM (4 years ago)
Author:
alain
Message:

Restructure the mini_libc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user/sort/sort.c

    r444 r445  
    2525#include <stdlib.h>
    2626#include <pthread.h>
    27 #include <almos-mkh.h>
     27#include <almosmkh.h>
    2828
    2929#define ARRAY_LENGTH        0x400    // 1024 values
     
    163163    bubbleSort( array0, items, items * thread_uid );
    164164
    165     printf("\n[SORT] thread[%d] / stage 0 completed\n", thread_uid );
     165    printf("\n[SORT] thread[%d] : stage 0 completed\n", thread_uid );
    166166
    167167    /////////////////////////////////
     
    177177        if( (thread_uid & ((1<<i)-1)) == 0 )
    178178        {
    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 );
    180180
    181181            if((i % 2) == 1)               // odd stage
     
    197197                   items * thread_uid );
    198198
    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 );
    200200        }
    201201
     
    328328
    329329#if INTERACTIVE_MODE
    330 idbg();
     330// idbg();
    331331#endif
    332332            }
     
    336336    get_cycle( &cycle );
    337337    printf("\n[SORT] main completes threads create at cycle %d\n", (unsigned int)cycle );
    338 
    339     // main run also the sort() function
    340     sort( &arg[main_uid] );
    341338
    342339#if INTERACTIVE_MODE
     
    344341#endif
    345342   
     343    // the main thread run also the sort() function
     344    sort( &arg[main_uid] );
     345
    346346    // Check result
    347347    int    success = 1;
Note: See TracChangeset for help on using the changeset viewer.