Changeset 8cd5434


Ignore:
Timestamp:
May 13, 2021, 3:49:05 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e2f601f
Parents:
57f70ab
Message:

Added function to poll ready-queue length.
Not officially supported.

Location:
libcfa/src/concurrency
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel.hfa

    r57f70ab r8cd5434  
    176176void  ?{}(__ready_queue_t & this);
    177177void ^?{}(__ready_queue_t & this);
     178#if !defined(__CFA_NO_STATISTICS__)
     179        unsigned cnt(const __ready_queue_t & this, unsigned idx);
     180#endif
    178181
    179182// Idle Sleep
  • libcfa/src/concurrency/ready_queue.cfa

    r57f70ab r8cd5434  
    702702        /* paranoid */ verify( ready_mutate_islocked() );
    703703}
     704
     705#if !defined(__CFA_NO_STATISTICS__)
     706        unsigned cnt(const __ready_queue_t & this, unsigned idx) {
     707                /* paranoid */ verify(this.lanes.count > idx);
     708                return this.lanes.data[idx].cnt;
     709        }
     710#endif
Note: See TracChangeset for help on using the changeset viewer.