Ignore:
Timestamp:
Nov 19, 2021, 3:53:47 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
7ef162b2
Parents:
cd4c605
Message:

Flush now supports blocking until at least one I/O op terminates.

File:
1 edited

Legend:

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

    rcd4c605 r059ad16  
    130130extern void __cfa_io_start( processor * );
    131131extern bool __cfa_io_drain( processor * );
    132 extern void __cfa_io_flush( processor * );
     132extern bool __cfa_io_flush( processor *, bool wait );
    133133extern void __cfa_io_stop ( processor * );
    134134static inline bool __maybe_io_drain( processor * );
     
    197197                        if( !readyThread ) {
    198198                                ready_schedule_lock();
    199                                 __cfa_io_flush( this );
     199                                __cfa_io_flush( this, false );
    200200                                ready_schedule_unlock();
    201201
     
    251251                        if(this->io.pending && !this->io.dirty) {
    252252                                ready_schedule_lock();
    253                                 __cfa_io_flush( this );
     253                                __cfa_io_flush( this, false );
    254254                                ready_schedule_unlock();
    255255                        }
     
    268268
    269269                                // If we can't find a thread, might as well flush any outstanding I/O
    270                                 if(this->io.pending) { __cfa_io_flush( this ); }
     270                                if(this->io.pending) { __cfa_io_flush( this, false ); }
    271271
    272272                                // Spin a little on I/O, just in case
     
    363363
    364364                        if(this->io.pending && !this->io.dirty) {
    365                                 __cfa_io_flush( this );
     365                                __cfa_io_flush( this, false );
    366366                        }
    367367
Note: See TracChangeset for help on using the changeset viewer.