Changeset 9d47c1f for libcfa/src/concurrency/io.cfa
- Timestamp:
- Sep 6, 2023, 3:44:03 PM (13 months ago)
- Branches:
- master
- Children:
- cb0bcf1
- Parents:
- 92d8cda
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r92d8cda r9d47c1f 594 594 lock( queue.lock __cfaabi_dbg_ctx2 ); 595 595 { 596 was_empty = empty(queue.queue);596 was_empty = queue.queue`isEmpty; 597 597 598 598 // Add our request to the list 599 add( queue.queue, item );599 insert_last( queue.queue, item ); 600 600 601 601 // Mark as pending … … 632 632 // notify the arbiter that new allocations are available 633 633 static void __ioarbiter_notify( io_arbiter$ & this, io_context$ * ctx ) { 634 /* paranoid */ verify( ! empty(this.pending.queue));634 /* paranoid */ verify( !this.pending.queue`isEmpty ); 635 635 /* paranoid */ verify( __preemption_enabled() ); 636 636 … … 642 642 // as long as there are pending allocations try to satisfy them 643 643 // for simplicity do it in FIFO order 644 while( ! empty(this.pending.queue)) {644 while( !this.pending.queue`isEmpty ) { 645 645 // get first pending allocs 646 646 __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); 648 648 649 649 // check if we have enough to satisfy the request … … 651 651 652 652 // if there are enough allocations it means we can drop the request 653 drop( this.pending.queue );653 try_pop_front( this.pending.queue ); 654 654 655 655 /* paranoid */__attribute__((unused)) bool ret = … … 727 727 // pop each operation one at a time. 728 728 // 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 ) { 730 730 // 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 ); 732 732 733 733 // submit it
Note: See TracChangeset
for help on using the changeset viewer.