Changeset 528 for trunk/kernel/fs


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/kernel/fs/vfs.c

    r527 r528  
    11301130    uint32_t  y_size    = LOCAL_CLUSTER->y_size;
    11311131    uint32_t  y_width   = LOCAL_CLUSTER->y_width;
    1132     uint32_t  index     = ( hal_get_cycles() + hal_get_gid() ) % (x_size * y_size);
    1133     uint32_t  x         = index / y_size;   
    1134     uint32_t  y         = index % y_size;
     1132    uint32_t  index     = ( hal_get_cycles() + hal_get_gid() ) % (x_size * (y_size - 1)); // [FIXME]
     1133    uint32_t  x         = index / (y_size - 1); // [FIXME]
     1134    uint32_t  y         = index % (y_size - 1); // [FIXME]
    11351135
    11361136    return (x<<y_width) + y;
Note: See TracChangeset for help on using the changeset viewer.