Changeset 596 for trunk/user/sort


Ignore:
Timestamp:
Nov 10, 2018, 2:53:23 PM (5 years ago)
Author:
alain
Message:

Fix a big bug in ksh: wrong handling of illegal command, blocking ksh.

File:
1 edited

Legend:

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

    r588 r596  
    2424#include <stdio.h>
    2525#include <stdlib.h>
     26#include <unistd.h>
    2627#include <pthread.h>
    2728#include <almosmkh.h>
     
    157158    /////////////////////////////////
    158159    pthread_barrier_wait( &barrier );
    159     printf("\n[SORT] thread[%d] exit barrier\n", thread_uid );
     160    printf("\n[SORT] thread[%d] exit barrier 0\n", thread_uid );
    160161
    161162    // the number of threads contributing to sort
     
    192193        /////////////////////////////////
    193194        pthread_barrier_wait( &barrier );
    194         printf("\n[SORT] thread[%d] exit barrier\n", thread_uid );
     195        printf("\n[SORT] thread[%d] exit barrier %d\n", thread_uid , i );
    195196
    196197    }
     
    223224    pthread_barrierattr_t  barrier_attr;       // barrier attributes
    224225
    225     // compute number of threads (one thread per proc)
     226    // compute number of threads (one thread per core)
    226227    get_config( &x_size , &y_size , &ncores );
    227228    threads = x_size * y_size * ncores;
     
    268269    for ( n = 0 ; n < ARRAY_LENGTH ; n++ )
    269270    {
    270         array0[n] = rand();
     271        array0[n] = ARRAY_LENGTH - n - 1;
    271272    }
    272273
     
    315316                    }
    316317                }
    317 
    318 #if INTERACTIVE_MODE
    319 idbg();
    320 #endif
    321318            }
    322319        }
Note: See TracChangeset for help on using the changeset viewer.