Ignore:
Timestamp:
Apr 24, 2021, 6:07:42 PM (5 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
3bd4293, c6c7e6c
Parents:
986cb99
Message:

io_drain now returns true if anything was unparked

File:
1 edited

Legend:

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

    r986cb99 rc1c95b1  
    9090        static inline __u32 __release_sqes( struct $io_context & );
    9191
    92         void __cfa_io_drain( processor * proc ) {
     92        bool __cfa_io_drain( processor * proc ) {
    9393                /* paranoid */ verify( ! __preemption_enabled() );
    9494                /* paranoid */ verify( proc );
     
    104104                __STATS__( false, io.calls.drain++; io.calls.completed += count; )
    105105
     106                if(count == 0) return false;
     107
    106108                for(i; count) {
    107109                        unsigned idx = (head + i) & mask;
     
    124126                /* paranoid */ verify( ! __preemption_enabled() );
    125127
    126                 return;
     128                return true;
    127129        }
    128130
Note: See TracChangeset for help on using the changeset viewer.