Ignore:
Timestamp:
Jan 12, 2021, 1:50:56 PM (4 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:
56911ce
Parents:
481ee28
Message:

Moved zeroing-out of sqes to call.cfa

File:
1 edited

Legend:

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

    r481ee28 r7dafb7b  
    221221
    222222                __u32 idx;
    223                 volatile struct io_uring_sqe * sqe;
    224                 [sqe, idx] = __submit_alloc( ring, (__u64)(uintptr_t)&future );
    225 
    226                 sqe->__pad2[0] = sqe->__pad2[1] = sqe->__pad2[2] = 0;
     223                struct io_uring_sqe * sqe;
     224                [(volatile struct io_uring_sqe *) sqe, idx] = __submit_alloc( ring, (__u64)(uintptr_t)&future );
     225
    227226                sqe->opcode = IORING_OP_{op};
    228                 sqe->flags = sflags;{body}
     227                sqe->flags = sflags;
     228                sqe->ioprio = 0;
     229                sqe->fd = 0;
     230                sqe->off = 0;
     231                sqe->addr = 0;
     232                sqe->len = 0;
     233                sqe->accept_flags = 0;
     234                sqe->__pad2[0] = 0;
     235                sqe->__pad2[1] = 0;
     236                sqe->__pad2[2] = 0;{body}
     237
     238                asm volatile("": : :"memory");
    229239
    230240                verify( sqe->user_data == (__u64)(uintptr_t)&future );
     
    314324        Call('ACCEPT', 'int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)', {
    315325                'fd': 'sockfd',
    316                 'ioprio': '0',
    317326                'addr': '(__u64)addr',
    318327                'addr2': '(__u64)addrlen',
     
    374383        Call('READ', 'ssize_t read(int fd, void * buf, size_t count)', {
    375384                'fd': 'fd',
    376                 'off': '0',
    377385                'addr': '(__u64)buf',
    378386                'len': 'count'
     
    381389        Call('WRITE', 'ssize_t write(int fd, void * buf, size_t count)', {
    382390                'fd': 'fd',
    383                 'off': '0',
    384391                'addr': '(__u64)buf',
    385392                'len': 'count'
Note: See TracChangeset for help on using the changeset viewer.