Changeset 983edfd


Ignore:
Timestamp:
Dec 12, 2019, 11:52:11 AM (23 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
c84b4be
Parents:
2a3d446
Message:

Ready queue seems to work but clearly shows quiescing is broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/ready_queue.cfa

    r2a3d446 r983edfd  
    484484                        verifyf((empty.mask[word] & (1ull << bit)) != 0, "After set %llu:%llu (%u), %llx & %llx", word, bit, i, empty.mask[word], (1ull << bit));
    485485                }
    486                 verify(empty.count <= (int)list.count);
    487                 verify( list.data[i].last_id == kernelTLS.this_processor->id );
    488                 verify( list.data[i].lock );
     486                verifyf( empty.count <= list.count, "Non-empty count (%zu) exceeds actual count (%zu)\n", empty.count, list.count );
     487                verifyf( list.data[i].last_id == kernelTLS.this_processor->id, "Expected last processor to lock queue %u to be %u, was %u\n", i, list.data[i].last_id, kernelTLS.this_processor->id );
     488                verifyf( list.data[i].lock, "List %u is not locked\n", i );
    489489
    490490                // Unlock and return
     
    768768                        __cfa_readyQ_mask_t clears = ~0;
    769769
    770                         for( b ; fbit ~ lbit ) {
     770                        for( b ; lbit ~ fbit ) {
    771771                                clears ^= 1 << b;
    772772                        }
    773773
    774774                        empty.mask[fword] &= clears;
     775
     776
     777                        empty.count = 0;
     778                        for( i ; lword ) {
     779                                empty.count += __builtin_popcountl(empty.mask[i]);
     780                        }
    775781                }
    776782
Note: See TracChangeset for help on using the changeset viewer.