Index: libcfa/src/concurrency/io.cfa
===================================================================
--- libcfa/src/concurrency/io.cfa	(revision 1c01c5836c12d14d4c519d76550c0381bc562aaf)
+++ libcfa/src/concurrency/io.cfa	(revision c402739f790c375d9b5414d824619c6457f1948d)
@@ -159,9 +159,8 @@
 
 	static inline void process(struct io_uring_cqe & cqe ) {
-		struct __io_user_data_t * data = (struct __io_user_data_t *)(uintptr_t)cqe.user_data;
-		__cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", data, cqe.res, data->thrd );
-
-		data->result = cqe.res;
-		post( data->sem );
+		struct io_future_t * future = (struct io_future_t *)(uintptr_t)cqe.user_data;
+		__cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", future, cqe.res, data->thrd );
+
+		fulfil( *future, cqe.res );
 	}
 
Index: libcfa/src/concurrency/io/call.cfa.in
===================================================================
--- libcfa/src/concurrency/io/call.cfa.in	(revision c402739f790c375d9b5414d824619c6457f1948d)
+++ libcfa/src/concurrency/io/call.cfa.in	(revision c402739f790c375d9b5414d824619c6457f1948d)
@@ -0,0 +1,506 @@
+#!python3
+#
+# Cforall Version 1.0.0 Copyright (C) 2020 University of Waterloo
+#
+# The contents of this file are covered under the licence agreement in the
+# file "LICENCE" distributed with Cforall.
+#
+# call.cfa.in -- Python script to generate io/call.cfa
+#
+# Author           : Thierry Delisle
+# Created On       : Fri Sep 11 12:41:16 2020
+# Last Modified By :
+# Last Modified On :
+# Update Count     :
+#
+
+Header = """//
+// Cforall Version 1.0.0 Copyright (C) 2020 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// call.cfa -- Api for cforall
+//
+// Author           : Generated from call.cfa.in
+// Created On       : {}
+//
+
+"""
+
+Prelude = """#define __cforall_thread__
+
+#include "bits/defs.hfa"
+#include "kernel.hfa"
+
+//=============================================================================================
+// I/O uring backend
+//=============================================================================================
+
+#if defined(CFA_HAVE_LINUX_IO_URING_H)
+	#include <assert.h>
+	#include <stdint.h>
+	#include <errno.h>
+	#include <linux/io_uring.h>
+
+	#include "kernel/fwd.hfa"
+	#include "io/types.hfa"
+
+	#if defined(CFA_HAVE_IOSQE_FIXED_FILE) && defined(CFA_HAVE_IOSQE_IO_DRAIN) && defined(CFA_HAVE_IOSQE_ASYNC)
+		#define REGULAR_FLAGS (IOSQE_FIXED_FILE | IOSQE_IO_DRAIN | IOSQE_ASYNC)
+	#elif defined(CFA_HAVE_IOSQE_FIXED_FILE) && defined(CFA_HAVE_IOSQE_ASYNC)
+		#define REGULAR_FLAGS (IOSQE_FIXED_FILE | IOSQE_ASYNC)
+	#elif defined(CFA_HAVE_IOSQE_FIXED_FILE) && defined(CFA_HAVE_IOSQE_IO_DRAIN)
+		#define REGULAR_FLAGS (IOSQE_FIXED_FILE | IOSQE_IO_DRAIN)
+	#elif defined(CFA_HAVE_IOSQE_IO_DRAIN) && defined(CFA_HAVE_IOSQE_ASYNC)
+		#define REGULAR_FLAGS (IOSQE_IO_DRAIN | IOSQE_ASYNC)
+	#elif defined(CFA_HAVE_IOSQE_FIXED_FILE)
+		#define REGULAR_FLAGS (IOSQE_FIXED_FILE)
+	#elif defined(CFA_HAVE_IOSQE_IO_DRAIN)
+		#define REGULAR_FLAGS (IOSQE_IO_DRAIN)
+	#elif defined(CFA_HAVE_IOSQE_ASYNC)
+		#define REGULAR_FLAGS (IOSQE_ASYNC)
+	#else
+		#define REGULAR_FLAGS (0)
+	#endif
+
+	#if defined(CFA_HAVE_IOSQE_IO_LINK) && defined(CFA_HAVE_IOSQE_IO_HARDLINK)
+		#define LINK_FLAGS (IOSQE_IO_LINK | IOSQE_IO_HARDLINK)
+	#elif defined(CFA_HAVE_IOSQE_IO_LINK)
+		#define LINK_FLAGS (IOSQE_IO_LINK)
+	#elif defined(CFA_HAVE_IOSQE_IO_HARDLINK)
+		#define LINK_FLAGS (IOSQE_IO_HARDLINK)
+	#else
+		#define LINK_FLAGS (0)
+	#endif
+
+	#if defined(CFA_HAVE_SPLICE_F_FD_IN_FIXED)
+		#define SPLICE_FLAGS (SPLICE_F_FD_IN_FIXED)
+	#else
+		#define SPLICE_FLAGS (0)
+	#endif
+
+	extern [* struct io_uring_sqe, __u32] __submit_alloc( struct __io_data & ring, __u64 data );
+	extern void __submit( struct io_context * ctx, __u32 idx ) __attribute__((nonnull (1)));
+
+	static inline io_context * __get_io_context( void ) {
+		cluster * cltr = active_cluster();
+
+		/* paranoid */ verifyf( cltr, "No active cluster for io operation\\n");
+		assertf( cltr->io.cnt > 0, "Cluster %p has no default io contexts and no context was specified\\n", cltr );
+
+		/* paranoid */ verifyf( cltr->io.ctxs, "default io contexts for cluster %p are missing\\n", cltr);
+		return &cltr->io.ctxs[ __tls_rand() % cltr->io.cnt ];
+	}
+#endif
+
+//=============================================================================================
+// I/O Forwards
+//=============================================================================================
+#include <time.hfa>
+
+// Some forward declarations
+#include <errno.h>
+#include <unistd.h>
+
+extern "C" {
+	#include <sys/types.h>
+	#include <sys/socket.h>
+	#include <sys/syscall.h>
+
+#if defined(HAVE_PREADV2)
+	struct iovec;
+	extern ssize_t preadv2 (int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags);
+#endif
+#if defined(HAVE_PWRITEV2)
+	struct iovec;
+	extern ssize_t pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags);
+#endif
+
+	extern int fsync(int fd);
+
+	#if __OFF_T_MATCHES_OFF64_T
+		typedef __off64_t off_t;
+	#else
+		typedef __off_t off_t;
+	#endif
+	typedef __off64_t off64_t;
+	extern int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags);
+
+	struct msghdr;
+	struct sockaddr;
+	extern ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);
+	extern ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
+	extern ssize_t send(int sockfd, const void *buf, size_t len, int flags);
+	extern ssize_t recv(int sockfd, void *buf, size_t len, int flags);
+	extern int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);
+	extern int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
+
+	extern int fallocate(int fd, int mode, off_t offset, off_t len);
+	extern int posix_fadvise(int fd, off_t offset, off_t len, int advice);
+	extern int madvise(void *addr, size_t length, int advice);
+
+	extern int openat(int dirfd, const char *pathname, int flags, mode_t mode);
+	extern int close(int fd);
+
+	extern ssize_t read (int fd, void *buf, size_t count);
+
+	struct epoll_event;
+	extern int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
+
+	extern ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags);
+	extern ssize_t tee(int fd_in, int fd_out, size_t len, unsigned int flags);
+}
+
+//=============================================================================================
+// I/O Interface
+//=============================================================================================
+"""
+
+print(Header.format("A Date"))
+print(Prelude)
+
+import re
+import sys
+class Call:
+	def __init__(self, op, signature, body, define=None):
+		sig = re.search("(.*) (.*)\((.*)\)", signature)
+		if not sig:
+			print("OP '{}' has invalid signature {}".format(op, signature), file=sys.stderr)
+			sys.exit(1)
+
+		self.op     = op
+		self.ret    = sig.group(1)
+		self.name   = sig.group(2)
+		self.params = sig.group(3)
+		self.define = define
+		self.body = ""
+
+		accepted_keys = [ 'ioprio', 'fd', 'off', 'addr2','addr', 'splice_off_in','len',
+			'rw_flags', 'fsync_flags', 'poll_events', 'poll32_events',
+			'sync_range_flags', 'msg_flags', 'timeout_flags', 'accept_flags',
+			'cancel_flags', 'open_flags', 'statx_flags', 'fadvise_advice',
+			'splice_flags', 'buf_index' ,'buf_group' 'personality',
+			'splice_fd_in' ]
+
+		for k, v in body.items():
+			if not k in accepted_keys:
+				print("OP '{}' has invalid body kew {}".format(op, k), file=sys.stderr)
+				sys.exit(1)
+
+			self.body += "\n		sqe->{key} = {value};".format(key=k, value=v)
+
+
+	def args(self):
+		param_a = self.params.split(',')
+		args_a = [p.replace('*', ' ').split()[-1] for p in param_a]
+		for a in args_a:
+			if '*' in a:
+				print("OP '{}' has invalid * in argument {}".format(self.op, a), file=sys.stderr)
+				sys.exit(1)
+
+		return ', '.join(args_a)
+
+AsyncTemplate = """inline void async_{name}(io_future_t & future, {params}, int submit_flags, io_cancellation * cancellation, io_context * context) {{
+	#if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_{op})
+		ssize_t res = {name}({args});
+		if (res >= 0) {{
+			fulfil(future, res);
+		}}
+		else {{
+			fulfil(future, -errno);
+		}}
+	#else
+		// we don't support LINK yet
+		if( 0 != (submit_flags & LINK_FLAGS) ) {{
+			errno = ENOTSUP; return -1;
+		}}
+
+		if( !context ) {{
+			context = __get_io_context();
+		}}
+		if(cancellation) {{
+			cancellation->target = (__u64)(uintptr_t)&future;
+		}}
+
+		__u8 sflags = REGULAR_FLAGS & submit_flags;
+		struct __io_data & ring = *context->thrd.ring;
+
+		__u32 idx;
+		struct io_uring_sqe * sqe;
+		[sqe, idx] = __submit_alloc( ring, (__u64)(uintptr_t)&future );
+
+		sqe->__pad2[0] = sqe->__pad2[1] = sqe->__pad2[2] = 0;
+		sqe->opcode = IORING_OP_{op};
+		sqe->flags = sflags;{body}
+
+		verify( sqe->user_data == (__u64)(uintptr_t)&future );
+		__submit( context, idx );
+	#endif
+}}"""
+
+SyncTemplate = """{ret} cfa_{name}({params}, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context) {{
+	if( timeout >= 0 ) {{
+		errno = ENOTSUP;
+		return -1;
+	}}
+	io_future_t future;
+
+	async_{name}( future, {args}, submit_flags, cancellation, context );
+
+	wait( future );
+	if( future.result < 0 ) {{
+		errno = -future.result;
+		return -1;
+	}}
+	return future.result;
+}}"""
+
+calls = [
+	# CFA_HAVE_IORING_OP_READV
+	Call('READV', 'ssize_t preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags)', {
+		'fd'  : 'fd',
+		'off' : 'offset',
+		'addr': '(__u64)iov',
+		'len' : 'iovcnt',
+	}, define = 'CFA_HAVE_PREADV2'),
+	# CFA_HAVE_IORING_OP_WRITEV
+	Call('WRITEV', 'ssize_t pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags)', {
+		'fd'  : 'fd',
+		'off' : 'offset',
+		'addr': '(__u64)iov',
+		'len' : 'iovcnt'
+	}, define = 'CFA_HAVE_PWRITEV2'),
+	# CFA_HAVE_IORING_OP_FSYNC
+	Call('FSYNC', 'int fsync(int fd)', {
+		'fd': 'fd'
+	}),
+	# CFA_HAVE_IORING_OP_EPOLL_CTL
+	Call('EPOLL_CTL', 'int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)', {
+		'fd': 'epfd',
+		'addr': 'fd',
+		'len': 'op',
+		'off': '(__u64)event'
+	}),
+	# CFA_HAVE_IORING_OP_SYNC_FILE_RANGE
+	Call('SYNC_FILE_RANGE', 'int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)', {
+		'fd': 'fd',
+		'off': 'offset',
+		'len': 'nbytes',
+		'sync_range_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_SENDMSG
+	Call('SENDMSG', 'ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags)', {
+		'fd': 'sockfd',
+		'addr': '(__u64)(struct msghdr *)msg',
+		'len': '1',
+		'msg_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_RECVMSG
+	Call('RECVMSG', 'ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags)', {
+		'fd': 'sockfd',
+		'addr': '(__u64)(struct msghdr *)msg',
+		'len': '1',
+		'msg_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_SEND
+	Call('SEND', 'ssize_t send(int sockfd, const void *buf, size_t len, int flags)', {
+		'fd': 'sockfd',
+		'addr': 'buf',
+		'len': 'len',
+		'msg_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_RECV
+	Call('RECV', 'ssize_t recv(int sockfd, void *buf, size_t len, int flags)', {
+		'fd': 'sockfd',
+		'addr': 'buf',
+		'len': 'len',
+		'msg_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_ACCEPT
+	Call('ACCEPT4', 'int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)', {
+		'fd': 'sockfd',
+		'addr': 'addr',
+		'addr2': 'addrlen',
+		'accept_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_CONNECT
+	Call('CONNECT', 'int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)', {
+		'fd': 'sockfd',
+		'addr': 'addr',
+		'off': 'addrlen'
+	}),
+	# CFA_HAVE_IORING_OP_FALLOCATE
+	Call('FALLOCATE', 'int fallocate(int fd, int mode, off_t offset, off_t len)', {
+		'fd': 'fd',
+		'addr': '(__u64)len',
+		'len': 'mode',
+		'off': 'offset'
+	}),
+	# CFA_HAVE_IORING_OP_FADVISE
+	Call('FADVISE', 'int posix_fadvise(int fd, off_t offset, off_t len, int advice)', {
+		'fd': 'fd',
+		'off': 'off',
+		'len': 'len',
+		'fadvise_advice': 'advice'
+	}),
+	# CFA_HAVE_IORING_OP_MADVISE
+	Call('MADVISE', 'int madvise(void *addr, size_t length, int advice)', {
+		'addr': 'addr',
+		'len': 'length',
+		'fadvise_advice': 'advice'
+	}),
+	# CFA_HAVE_IORING_OP_OPENAT
+	Call('OPENAT', 'int openat(int dirfd, const char *pathname, int flags, mode_t mode)', {
+		'fd': 'dirfd',
+		'off': 'offset',
+		'addr': '(__u64)pathname',
+		'len': 'mode',
+		'open_flags': 'flags;'
+	}),
+	# CFA_HAVE_IORING_OP_OPENAT2
+	Call('OPENAT2', 'int openat2(int dirfd, const char *pathname, struct open_how * how, size_t size)', {
+		'fd': 'dirfd',
+		'addr': 'pathname',
+		'len': 'sizeof(*how)',
+		'off': '(__u64)how',
+	}, define = 'CFA_HAVE_OPENAT2'),
+	# CFA_HAVE_IORING_OP_CLOSE
+	Call('CLOSE', 'int close(int fd)', {
+		'fd': 'fd'
+	}),
+	# CFA_HAVE_IORING_OP_STATX
+	Call('STATX', 'int statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf)', {
+		'fd': 'dirfd',
+		'off': '(__u64)statxbuf',
+		'addr': 'pathname',
+		'len': 'mask',
+		'statx_flags': 'flags'
+	}, define = 'CFA_HAVE_STATX'),
+	# CFA_HAVE_IORING_OP_READ
+	Call('READ', 'ssize_t read(int fd, void * buf, size_t count)', {
+		'fd': 'fd',
+		'addr': 'buf',
+		'len': 'count'
+	}),
+	# CFA_HAVE_IORING_OP_WRITE
+	Call('WRITE', 'ssize_t write(int fd, void * buf, size_t count)', {
+		'fd': 'fd',
+		'addr': 'buf',
+		'len': 'count'
+	}),
+	# CFA_HAVE_IORING_OP_SPLICE
+	Call('SPLICE', 'ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags)', {
+		'splice_fd_in': 'fd_in',
+		'splice_off_in': 'off_in ? *off_in : -1',
+		'fd': 'fd_out',
+		'off': 'off_out ? *off_out : -1',
+		'len': 'len',
+		'splice_flags': 'flags'
+	}),
+	# CFA_HAVE_IORING_OP_TEE
+	Call('TEE', 'ssize_t tee(int fd_in, int fd_out, size_t len, unsigned int flags)', {
+		'splice_fd_in': 'fd_in',
+		'fd': 'fd_out',
+		'len': 'len',
+		'splice_flags': 'flags'
+	})
+]
+
+print("//----------")
+print("// synchronous calls")
+for c in calls:
+	if c.define:
+		print("""#if defined({define})
+	{ret} cfa_{name}({params}, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#endif""".format(define=c.define,ret=c.ret, name=c.name, params=c.params))
+	else:
+		print("{ret} cfa_{name}({params}, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);"
+		.format(ret=c.ret, name=c.name, params=c.params))
+
+print("\n//----------")
+print("// asynchronous calls")
+for c in calls:
+	if c.define:
+		print("""#if defined({define})
+	void async_{name}(io_future_t & future, {params}, int submit_flags, io_cancellation * cancellation, io_context * context);
+#endif""".format(define=c.define,name=c.name, params=c.params))
+	else:
+		print("void async_{name}(io_future_t & future, {params}, int submit_flags, io_cancellation * cancellation, io_context * context);"
+		.format(name=c.name, params=c.params))
+print("\n")
+
+for c in calls:
+	print("//-----------------------------------------------------------------------------")
+	print("// {}".format(c.name))
+	Async = AsyncTemplate.format(
+		name   = c.name,
+		ret    = c.ret,
+		params = c.params,
+		args   = c.args(),
+		op     = c.op,
+		body   = c.body
+
+	)
+	Sync = SyncTemplate.format(
+		name   = c.name,
+		ret    = c.ret,
+		params = c.params,
+		args   = c.args()
+	)
+
+	if c.define:
+		print("""#if defined({})
+	//----------
+	// asynchronous call
+	{}
+
+	//----------
+	// synchronous call
+	{}
+#endif
+""".format(c.define, "\n\t".join( Async.splitlines() ), "\n\t".join( Sync.splitlines() )))
+	else :
+		print("""//----------
+// asynchronous call
+{}
+
+//----------
+// synchronous call
+{}
+""".format(Async, Sync))
+
+print("""
+//-----------------------------------------------------------------------------
+// Check if a function is has asynchronous
+bool has_user_level_blocking( fptr_t func ) {
+ 	#if defined(CFA_HAVE_LINUX_IO_URING_H)""")
+
+for c in calls:
+	if c.define:
+		print("""		#if defined({define})
+ 			if( /*func == (fptr_t)preadv2 || */
+ 				func == (fptr_t)cfa_{name} ||
+				func == (fptr_t)async_{name} ) {{
+ 				#if defined(CFA_HAVE_IORING_OP_{op})
+					return true;
+				#else
+					return false;
+				#endif
+ 			}}
+ 		#endif""".format(define=c.define, name=c.name, op=c.op))
+	else:
+		print("""		if( /*func == (fptr_t)preadv2 || */
+			func == (fptr_t)cfa_{name} ||
+			func == (fptr_t)async_{name} ) {{
+			#if defined(CFA_HAVE_IORING_OP_{op})
+				return true;
+			#else
+				return false;
+			#endif
+		}}""".format(name=c.name, op=c.op))
+
+print(""" 	#endif
+
+ 	return false;
+}""")
Index: libcfa/src/concurrency/io/types.hfa
===================================================================
--- libcfa/src/concurrency/io/types.hfa	(revision 1c01c5836c12d14d4c519d76550c0381bc562aaf)
+++ libcfa/src/concurrency/io/types.hfa	(revision c402739f790c375d9b5414d824619c6457f1948d)
@@ -104,8 +104,20 @@
 	//-----------------------------------------------------------------------
 	// IO user data
-	struct __io_user_data_t {
+	struct io_future_t {
+		future_t self;
 		__s32 result;
-		oneshot sem;
 	};
+
+	static inline {
+		bool fulfil( io_future_t & this, __s32 result ) {
+			this.result = result;
+			return fulfil(this.self);
+		}
+
+		// Wait for the future to be fulfilled
+		bool wait( io_future_t & this ) {
+			return wait(this.self);
+		}
+	}
 
 	//-----------------------------------------------------------------------
Index: libcfa/src/concurrency/iofwd.hfa
===================================================================
--- libcfa/src/concurrency/iofwd.hfa	(revision 1c01c5836c12d14d4c519d76550c0381bc562aaf)
+++ libcfa/src/concurrency/iofwd.hfa	(revision c402739f790c375d9b5414d824619c6457f1948d)
@@ -40,4 +40,5 @@
 
 struct cluster;
+struct io_future_t;
 struct io_context;
 struct io_cancellation;
@@ -48,24 +49,70 @@
 struct statx;
 
-extern ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_fsync(int fd, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_sync_file_range(int fd, int64_t offset, int64_t nbytes, unsigned int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_sendmsg(int sockfd, const struct msghdr *msg, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_recvmsg(int sockfd, struct msghdr *msg, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_send(int sockfd, const void *buf, size_t len, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_recv(int sockfd, void *buf, size_t len, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_fallocate(int fd, int mode, uint64_t offset, uint64_t len, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_fadvise(int fd, uint64_t offset, uint64_t len, int advice, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_madvise(void *addr, size_t length, int advice, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_openat(int dirfd, const char *pathname, int flags, mode_t mode, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_close(int fd, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern int cfa_statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_read(int fd, void *buf, size_t count, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_write(int fd, void *buf, size_t count, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
-extern ssize_t cfa_tee(int fd_in, int fd_out, size_t len, unsigned int flags, int submit_flags = 0, Duration timeout = -1`s, io_cancellation * cancellation = 0p, io_context * context = 0p);
+//----------
+// synchronous calls
+#if defined(CFA_HAVE_PREADV2)
+	extern ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#endif
+#if defined(CFA_HAVE_PWRITEV2)
+	extern ssize_t cfa_pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#endif
+extern int cfa_fsync(int fd, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_epoll_ctl(int epfd, int op, int fd, struct epoll_event *event, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern  ssize_t cfa_sendmsg(int sockfd, const struct msghdr *msg, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern ssize_t cfa_recvmsg(int sockfd, struct msghdr *msg, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern ssize_t cfa_send(int sockfd, const void *buf, size_t len, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern ssize_t cfa_recv(int sockfd, void *buf, size_t len, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_fallocate(int fd, int mode, off_t offset, off_t len, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_posix_fadvise(int fd, off_t offset, off_t len, int advice, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_madvise(void *addr, size_t length, int advice, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern int cfa_openat(int dirfd, const char *pathname, int flags, mode_t mode, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#if defined(CFA_HAVE_OPENAT2)
+	extern int cfa_openat2(int dirfd, const char *pathname, struct open_how * how, size_t size, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#endif
+extern int cfa_close(int fd, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#if defined(CFA_HAVE_STATX)
+	extern int cfa_statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+#endif
+extern ssize_t cfa_read(int fd, void * buf, size_t count, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern ssize_t cfa_write(int fd, void * buf, size_t count, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern ssize_t cfa_splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+extern ssize_t cfa_tee(int fd_in, int fd_out, size_t len, unsigned int flags, int submit_flags, Duration timeout, io_cancellation * cancellation, io_context * context);
+
+//----------
+// asynchronous calls
+#if defined(CFA_HAVE_PREADV2)
+	extern void async_preadv2(io_future_t & future, int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+#endif
+#if defined(CFA_HAVE_PWRITEV2)
+	extern void async_pwritev2(io_future_t & future, int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+#endif
+extern void async_fsync(io_future_t & future, int fd, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_epoll_ctl(io_future_t & future, int epfd, int op, int fd, struct epoll_event *event, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_sync_file_range(io_future_t & future, int fd, off64_t offset, off64_t nbytes, unsigned int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_sendmsg(io_future_t & future, int sockfd, const struct msghdr *msg, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_recvmsg(io_future_t & future, int sockfd, struct msghdr *msg, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_send(io_future_t & future, int sockfd, const void *buf, size_t len, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_recv(io_future_t & future, int sockfd, void *buf, size_t len, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_accept4(io_future_t & future, int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_connect(io_future_t & future, int sockfd, const struct sockaddr *addr, socklen_t addrlen, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_fallocate(io_future_t & future, int fd, int mode, off_t offset, off_t len, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_posix_fadvise(io_future_t & future, int fd, off_t offset, off_t len, int advice, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_madvise(io_future_t & future, void *addr, size_t length, int advice, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_openat(io_future_t & future, int dirfd, const char *pathname, int flags, mode_t mode, int submit_flags, io_cancellation * cancellation, io_context * context);
+#if defined(CFA_HAVE_OPENAT2)
+	extern void async_openat2(io_future_t & future, int dirfd, const char *pathname, struct open_how * how, size_t size, int submit_flags, io_cancellation * cancellation, io_context * context);
+#endif
+extern void async_close(io_future_t & future, int fd, int submit_flags, io_cancellation * cancellation, io_context * context);
+#if defined(CFA_HAVE_STATX)
+	extern void async_statx(io_future_t & future, int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf, int submit_flags, io_cancellation * cancellation, io_context * context);
+#endif
+void async_read(io_future_t & future, int fd, void * buf, size_t count, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_write(io_future_t & future, int fd, void * buf, size_t count, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_splice(io_future_t & future, int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+extern void async_tee(io_future_t & future, int fd_in, int fd_out, size_t len, unsigned int flags, int submit_flags, io_cancellation * cancellation, io_context * context);
+
 
 //-----------------------------------------------------------------------------
Index: libcfa/src/concurrency/kernel.hfa
===================================================================
--- libcfa/src/concurrency/kernel.hfa	(revision 1c01c5836c12d14d4c519d76550c0381bc562aaf)
+++ libcfa/src/concurrency/kernel.hfa	(revision c402739f790c375d9b5414d824619c6457f1948d)
@@ -23,5 +23,6 @@
 
 extern "C" {
-#include <bits/pthreadtypes.h>
+	#include <bits/pthreadtypes.h>
+	#include <linux/types.h>
 }
 
@@ -157,5 +158,5 @@
 
 struct io_cancellation {
-	uint32_t target;
+	__u64 target;
 };
 
