Ignore:
Timestamp:
Apr 24, 2021, 6:07:42 PM (3 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:
3bd4293, c6c7e6c
Parents:
986cb99
Message:

io_drain now returns true if anything was unparked

File:
1 edited

Legend:

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

    r986cb99 rc1c95b1  
    118118
    119119extern void __cfa_io_start( processor * );
    120 extern void __cfa_io_drain( processor * );
     120extern bool __cfa_io_drain( processor * );
    121121extern void __cfa_io_flush( processor * );
    122122extern void __cfa_io_stop ( processor * );
    123 static inline void __maybe_io_drain( processor * );
     123static inline bool __maybe_io_drain( processor * );
    124124
    125125extern void __disable_interrupts_hard();
     
    743743#endif
    744744
    745 static inline void __maybe_io_drain( processor * proc ) {
     745static inline bool __maybe_io_drain( processor * proc ) {
    746746        #if defined(CFA_HAVE_LINUX_IO_URING_H)
    747747                __cfadbg_print_safe(runtime_core, "Kernel : core %p checking io for ring %d\n", proc, proc->io.ctx->fd);
     
    751751                unsigned head = *ctx->cq.head;
    752752                unsigned tail = *ctx->cq.tail;
    753                 if(head != tail) __cfa_io_drain( proc );
     753                if(head == tail) return false;
     754                return __cfa_io_drain( proc );
    754755        #endif
    755756}
Note: See TracChangeset for help on using the changeset viewer.