Changeset bdfd0bd


Ignore:
Timestamp:
Mar 30, 2022, 4:55:07 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
13cdc8c
Parents:
4ccc150
Message:

EINTR will no longer wakeup the idle_sleep.

File:
1 edited

Legend:

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

    r4ccc150 rbdfd0bd  
    9696        static void ioring_syscsll( struct $io_context & ctx, unsigned int min_comp, unsigned int flags ) {
    9797                __STATS__( true, io.calls.flush++; )
    98                 int ret = syscall( __NR_io_uring_enter, ctx.fd, ctx.sq.to_submit, min_comp, flags, (sigset_t *)0p, _NSIG / 8);
    99                 if( ret < 0 ) {
    100                         switch((int)errno) {
    101                         case EAGAIN:
    102                         case EINTR:
    103                         case EBUSY:
    104                                 // Update statistics
    105                                 __STATS__( false, io.calls.errors.busy ++; )
    106                                 return false;
    107                         default:
    108                                 abort( "KERNEL ERROR: IO_URING SYSCALL - (%d) %s\n", (int)errno, strerror(errno) );
     98                int ret;
     99                for() {
     100                        ret = syscall( __NR_io_uring_enter, ctx.fd, ctx.sq.to_submit, min_comp, flags, (sigset_t *)0p, _NSIG / 8);
     101                        if( ret < 0 ) {
     102                                switch((int)errno) {
     103                                case EINTR:
     104                                        continue;
     105                                case EAGAIN:
     106                                case EBUSY:
     107                                        // Update statistics
     108                                        __STATS__( false, io.calls.errors.busy ++; )
     109                                        return false;
     110                                default:
     111                                        abort( "KERNEL ERROR: IO_URING SYSCALL - (%d) %s\n", (int)errno, strerror(errno) );
     112                                }
    109113                        }
     114                        break;
    110115                }
    111116
Note: See TracChangeset for help on using the changeset viewer.