Changeset 528 for trunk/user


Ignore:
Timestamp:
Sep 21, 2018, 10:15:58 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Change usage of y_max/x_max for iterating through clusters.

This is due to empty cluster (without memory or not CPU cluster),
like IO cluster of MIPS32 LETI architecture.

File:
1 edited

Legend:

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

    r475 r528  
    9090 
    9191#if DEBUG_PROCESS_INIT
    92 unsigned int  x_size;        // number of clusters in a row
    93 unsigned int  y_size;        // number of clusters in a column
    94 unsigned int  ncores;        // number of cores per cluster
    95 unsigned int  x;             // cluster x coordinate
    96 unsigned int  y;             // cluster y coordinate
    97 unsigned int  cxy;           // cluster identifier
    98 unsigned int  lid;           // core local index
     92{
     93    unsigned int  x_size;        // number of clusters in a row
     94    unsigned int  y_size;        // number of clusters in a column
     95    unsigned int  ncores;        // number of cores per cluster
     96    unsigned int  x;             // cluster x coordinate
     97    unsigned int  y;             // cluster y coordinate
     98    unsigned int  cxy;           // cluster identifier
     99    unsigned int  lid;           // core local index
    99100
    100 // get hardware config
    101 get_config( &x_size , &y_size , &ncores );
    102    
    103 // INIT displays processes and threads in all clusters
    104 for( x = 0 ; x < x_size ; x++ )
    105 {
    106     for( y = 0 ; y < y_size ; y++ )
     101    // get hardware config
     102    get_config( &x_size , &y_size , &ncores );
     103
     104    // INIT displays processes and threads in all clusters
     105    for( x = 0 ; x < x_size ; x++ )
    107106    {
    108         cxy = CXY_FROM_XY( x , y );
    109         display_cluster_processes( cxy );
    110         for( lid = 0 ; lid < ncores ; lid++ )
    111         {
    112             display_sched( cxy , lid );
     107        for( y = 0 ; y < y_size - 1 ; y++ )
     108        {
     109            cxy = CXY_FROM_XY( x , y );
     110            display_cluster_processes( cxy );
     111            for( lid = 0 ; lid < ncores ; lid++ )
     112            {
     113                display_sched( cxy , lid );
     114            }
    113115        }
    114116    }
Note: See TracChangeset for help on using the changeset viewer.