Ignore:
Timestamp:
Sep 6, 2023, 3:44:03 PM (13 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
cb0bcf1
Parents:
92d8cda
Message:

changes over all usages of uC++ collections to use dlist instead

File:
1 edited

Legend:

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

    r92d8cda r9d47c1f  
    594594                lock( queue.lock __cfaabi_dbg_ctx2 );
    595595                {
    596                         was_empty = empty(queue.queue);
     596                        was_empty = queue.queue`isEmpty;
    597597
    598598                        // Add our request to the list
    599                         add( queue.queue, item );
     599                        insert_last( queue.queue, item );
    600600
    601601                        // Mark as pending
     
    632632        // notify the arbiter that new allocations are available
    633633        static void __ioarbiter_notify( io_arbiter$ & this, io_context$ * ctx ) {
    634                 /* paranoid */ verify( !empty(this.pending.queue) );
     634                /* paranoid */ verify( !this.pending.queue`isEmpty );
    635635                /* paranoid */ verify( __preemption_enabled() );
    636636
     
    642642                        // as long as there are pending allocations try to satisfy them
    643643                        // for simplicity do it in FIFO order
    644                         while( !empty(this.pending.queue) ) {
     644                        while( !this.pending.queue`isEmpty ) {
    645645                                // get first pending allocs
    646646                                __u32 have = ctx->sq.free_ring.tail - ctx->sq.free_ring.head;
    647                                 __pending_alloc & pa = (__pending_alloc&)head( this.pending.queue );
     647                                __pending_alloc & pa = (__pending_alloc&)(this.pending.queue`first);
    648648
    649649                                // check if we have enough to satisfy the request
     
    651651
    652652                                // if there are enough allocations it means we can drop the request
    653                                 drop( this.pending.queue );
     653                                try_pop_front( this.pending.queue );
    654654
    655655                                /* paranoid */__attribute__((unused)) bool ret =
     
    727727                        // pop each operation one at a time.
    728728                        // There is no wait morphing because of the io sq ring
    729                         while( !empty(ctx.ext_sq.queue) ) {
     729                        while( !ctx.ext_sq.queue`isEmpty ) {
    730730                                // drop the element from the queue
    731                                 __external_io & ei = (__external_io&)drop( ctx.ext_sq.queue );
     731                                __external_io & ei = (__external_io&)try_pop_front( ctx.ext_sq.queue );
    732732
    733733                                // submit it
Note: See TracChangeset for help on using the changeset viewer.