Ignore:
File:
1 edited

Legend:

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

    rcefd0b9 r108345a  
    3434#include "kernel.hfa"
    3535#include "io/types.hfa"
    36 #include "stats.hfa"
    3736
    3837//=============================================================================================
     
    7574        ;
    7675
    77         extern struct io_context$ * cfa_io_allocate(struct io_uring_sqe * out_sqes[], __u32 out_idxs[], __u32 want)  __attribute__((nonnull (1,2)));
    78         extern void cfa_io_submit( struct io_context$ * in_ctx, __u32 in_idxs[], __u32 have, bool lazy ) __attribute__((nonnull (1,2)));
     76        extern struct $io_context * cfa_io_allocate(struct io_uring_sqe * out_sqes[], __u32 out_idxs[], __u32 want)  __attribute__((nonnull (1,2)));
     77        extern void cfa_io_submit( struct $io_context * in_ctx, __u32 in_idxs[], __u32 have, bool lazy ) __attribute__((nonnull (1,2)));
    7978#endif
    8079
     
    200199                __u32 idx;
    201200                struct io_uring_sqe * sqe;
    202                 struct io_context$ * ctx = cfa_io_allocate( &sqe, &idx, 1 );
    203 
    204                 memset(sqe, 0, sizeof(*sqe));
     201                struct $io_context * ctx = cfa_io_allocate( &sqe, &idx, 1 );
     202
    205203                sqe->opcode = IORING_OP_{op};
     204                sqe->user_data = (uintptr_t)&future;
    206205                sqe->flags = sflags;
    207                 sqe->user_data = (uintptr_t)&future;
    208                 {body}
     206                sqe->ioprio = 0;
     207                sqe->fd = 0;
     208                sqe->off = 0;
     209                sqe->addr = 0;
     210                sqe->len = 0;
     211                sqe->fsync_flags = 0;
     212                sqe->__pad2[0] = 0;
     213                sqe->__pad2[1] = 0;
     214                sqe->__pad2[2] = 0;{body}
    209215
    210216                asm volatile("": : :"memory");
     
    220226        async_{name}( future, {args}, submit_flags );
    221227
    222         __attribute__((unused)) bool parked;
    223         parked = wait( future );
    224         __STATS__(false, if(!parked) io.submit.nblk += 1; )
     228        wait( future );
    225229        if( future.result < 0 ) {{
    226230                errno = -future.result;
Note: See TracChangeset for help on using the changeset viewer.