Changeset 656 for trunk/user/fft/fft.c


Ignore:
Timestamp:
Dec 6, 2019, 12:07:51 PM (5 years ago)
Author:
alain
Message:

Fix several bugs in the FATFS and in the VFS,
related to the creation of big files requiring
more than 4 Kbytes (one cluster) on device.

File:
1 edited

Legend:

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

    r652 r656  
    177177
    178178// array of kernel thread identifiers / indexed by [tid]
    179 pthread_t      work_trdid[CLUSTERS_MAX * CORES_MAX];   
     179pthread_t                     work_trdid[CLUSTERS_MAX * CORES_MAX];   
    180180
    181181// array of thread attributes / indexed by [tid]
    182 pthread_attr_t work_attr[CLUSTERS_MAX * CORES_MAX];
     182pthread_attr_t                work_attr[CLUSTERS_MAX * CORES_MAX];
    183183
    184184// array of work function arguments / indexed by [tid]
    185 pthread_parallel_work_args_t work_args[CLUSTERS_MAX * CORES_MAX];
     185pthread_parallel_work_args_t  work_args[CLUSTERS_MAX * CORES_MAX];
    186186
    187187/////////////////////////////////////////////////////////////////////////////////////
     
    189189/////////////////////////////////////////////////////////////////////////////////////
    190190
    191 void work( pthread_parallel_work_args_t * args );
     191void * work( void * args );
    192192
    193193double CheckSum( void );
     
    254254// launch the parallel execution, and makes the instrumentation.
    255255///////////////////////////////////////////////////////////////////
    256 void main ( void )
     256int main ( void )
    257257{
    258258    int                 error;
     
    699699    exit( 0 );
    700700
     701    return 0;
     702
    701703} // end main()
    702704
     
    704706// This function is executed in parallel by all <work> threads.
    705707/////////////////////////////////////////////////////////////////
    706 void work( pthread_parallel_work_args_t * args )
     708void * work( void * arguments )
    707709{
    708710    unsigned int        tid;              // this thread continuous index
    709711    unsigned int        lid;              // core local index
    710712    unsigned int        cid;              // cluster continuous index
    711     pthread_barrier_t * parent_barrier;   // pointer on parent barrier
    712713
    713714    unsigned int        MyFirst;          // index first row allocated to thread
     
    723724
    724725    // get thread arguments
    725     tid            = args->tid;
    726     parent_barrier = args->barrier;
     726    pthread_parallel_work_args_t * args = (pthread_parallel_work_args_t *)arguments;
     727   
     728    tid                                = args->tid;
     729    pthread_barrier_t * parent_barrier = args->barrier;
    727730
    728731    // compute lid and cid from tid
     
    861864    //  work thread exit
    862865    pthread_exit( NULL );
     866
     867    return NULL;
    863868
    864869}  // end work()
Note: See TracChangeset for help on using the changeset viewer.