Changeset ddd2ec9


Ignore:
Timestamp:
Nov 29, 2021, 12:19:00 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
c7b2215
Parents:
7ef162b2
Message:

Fix cache detention when only some cpus are present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/device/cpu.cfa

    r7ef162b2 rddd2ec9  
    159159
    160160        const char * _;
    161         int cnt = read_width(buff, r - 1, &_);
    162         /* paranoid */ verify(cnt == count_prefix_dirs("/sys/devices/system/cpu", "cpu"));
    163         return cnt;
     161        return read_width(buff, r - 1, &_);;
    164162}
    165163
     
    238236{
    239237        raw_cache_instance ** raw = alloc(cpus);
     238
     239        // TODO: this loop is broken, it only works if the present cpu start at 0 and are contiguous which is not guaranteed.
    240240        for(i; cpus) {
    241241                raw[i] = alloc(cache_levels);
Note: See TracChangeset for help on using the changeset viewer.