- File:
-
- 1 edited
-
libcfa/src/concurrency/io/call.cfa.in (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io/call.cfa.in
r108345a rcefd0b9 34 34 #include "kernel.hfa" 35 35 #include "io/types.hfa" 36 #include "stats.hfa" 36 37 37 38 //============================================================================================= … … 74 75 ; 75 76 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)));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))); 78 79 #endif 79 80 … … 199 200 __u32 idx; 200 201 struct io_uring_sqe * sqe; 201 struct $io_context * ctx = cfa_io_allocate( &sqe, &idx, 1 ); 202 202 struct io_context$ * ctx = cfa_io_allocate( &sqe, &idx, 1 ); 203 204 memset(sqe, 0, sizeof(*sqe)); 203 205 sqe->opcode = IORING_OP_{op}; 206 sqe->flags = sflags; 204 207 sqe->user_data = (uintptr_t)&future; 205 sqe->flags = sflags; 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} 208 {body} 215 209 216 210 asm volatile("": : :"memory"); … … 226 220 async_{name}( future, {args}, submit_flags ); 227 221 228 wait( future ); 222 __attribute__((unused)) bool parked; 223 parked = wait( future ); 224 __STATS__(false, if(!parked) io.submit.nblk += 1; ) 229 225 if( future.result < 0 ) {{ 230 226 errno = -future.result;
Note:
See TracChangeset
for help on using the changeset viewer.