Changeset 2606a03


Ignore:
Timestamp:
Aug 13, 2020, 5:47:48 PM (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:
080ee15
Parents:
2b5be17
Message:

Fixed error where submitflags where incorrectly overwritten.
Fixed only for readv, everything else is broken.

File:
1 edited

Legend:

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

    r2b5be17 r2606a03  
    101101        #endif
    102102
    103 
    104103        #define __submit_prelude \
    105104                if( 0 != (submit_flags & LINK_FLAGS) ) { errno = ENOTSUP; return -1; } \
     
    110109                struct io_uring_sqe * sqe; \
    111110                uint32_t idx; \
     111                uint8_t sflags = REGULAR_FLAGS & submit_flags; \
    112112                [sqe, idx] = __submit_alloc( ring, (uint64_t)(uintptr_t)&data ); \
    113                 sqe->flags = REGULAR_FLAGS & submit_flags;
     113                sqe->flags = sflags;
    114114
    115115        #define __submit_wait \
     
    186186                        __submit_prelude
    187187
    188                         (*sqe){ IORING_OP_READV, fd, iov, iovcnt, offset };
     188                        sqe->opcode = IORING_OP_READV;
     189                        sqe->ioprio = 0;
     190                        sqe->fd = fd;
     191                        sqe->off = offset;
     192                        sqe->addr = (uint64_t)(uintptr_t)iov;
     193                        sqe->len = iovcnt;
     194                        sqe->rw_flags = 0;
     195                        sqe->__pad2[0] = sqe->__pad2[1] = sqe->__pad2[2] = 0;
    189196
    190197                        __submit_wait
Note: See TracChangeset for help on using the changeset viewer.