Changeset dddb3dd0 for libcfa/src/concurrency/io/call.cfa.in
- Timestamp:
- Mar 2, 2021, 1:58:12 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2cd784a
- Parents:
- 6047b00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io/call.cfa.in
r6047b00 rdddb3dd0 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 ) __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))); 78 78 #endif 79 79 … … 185 185 return ', '.join(args_a) 186 186 187 AsyncTemplate = """inline void async_{name}(io_future_t & future, {params}, intsubmit_flags) {{187 AsyncTemplate = """inline void async_{name}(io_future_t & future, {params}, __u64 submit_flags) {{ 188 188 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_{op}) 189 189 ssize_t res = {name}({args}); … … 216 216 217 217 verify( sqe->user_data == (__u64)(uintptr_t)&future ); 218 cfa_io_submit( ctx, &idx, 1 );218 cfa_io_submit( ctx, &idx, 1, 0 != (submit_flags & CFA_IO_LAZY) ); 219 219 #endif 220 220 }}""" 221 221 222 SyncTemplate = """{ret} cfa_{name}({params}, intsubmit_flags) {{222 SyncTemplate = """{ret} cfa_{name}({params}, __u64 submit_flags) {{ 223 223 io_future_t future; 224 224 … … 388 388 if c.define: 389 389 print("""#if defined({define}) 390 {ret} cfa_{name}({params}, intsubmit_flags);390 {ret} cfa_{name}({params}, __u64 submit_flags); 391 391 #endif""".format(define=c.define,ret=c.ret, name=c.name, params=c.params)) 392 392 else: 393 print("{ret} cfa_{name}({params}, intsubmit_flags);"393 print("{ret} cfa_{name}({params}, __u64 submit_flags);" 394 394 .format(ret=c.ret, name=c.name, params=c.params)) 395 395 … … 399 399 if c.define: 400 400 print("""#if defined({define}) 401 void async_{name}(io_future_t & future, {params}, intsubmit_flags);401 void async_{name}(io_future_t & future, {params}, __u64 submit_flags); 402 402 #endif""".format(define=c.define,name=c.name, params=c.params)) 403 403 else: 404 print("void async_{name}(io_future_t & future, {params}, intsubmit_flags);"404 print("void async_{name}(io_future_t & future, {params}, __u64 submit_flags);" 405 405 .format(name=c.name, params=c.params)) 406 406 print("\n")
Note: See TracChangeset
for help on using the changeset viewer.