Changeset 63fe427c


Ignore:
Timestamp:
Aug 14, 2020, 11:38:31 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
309d814
Parents:
080ee15
Message:

Added checks for incorrect io setups.
Fix bug where number of entries parameter was ignored.

File:
1 edited

Legend:

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

    r080ee15 r63fe427c  
    298298                if( params_in.poll_complete ) params.flags |= IORING_SETUP_IOPOLL;
    299299
    300                 uint32_t nentries = params_in.num_entries;
     300                uint32_t nentries = params_in.num_entries != 0 ? params_in.num_entries : 256;
     301                if( !is_pow2(nentries) ) {
     302                        abort("ERROR: I/O setup 'num_entries' must be a power of 2\n");
     303                }
     304                if( params_in.poller_submits && params_in.eager_submits ) {
     305                        abort("ERROR: I/O setup 'poller_submits' and 'eager_submits' cannot be used together\n");
     306                }
    301307
    302308                int fd = syscall(__NR_io_uring_setup, nentries, &params );
Note: See TracChangeset for help on using the changeset viewer.