|
Condy v1.3.0
C++ Asynchronous System Call Layer for Linux
|
The main namespace for the Condy library. More...
Namespaces | |
| namespace | operators |
| Operators for composing awaiters. | |
| namespace | pmr |
| Polymorphic memory resource (PMR) related types and utilities. | |
Classes | |
| class | MutableBuffer |
| Mutable buffer. More... | |
| class | ConstBuffer |
| Constant buffer. More... | |
| class | Channel |
| Thread-safe bounded channel for communication and synchronization. More... | |
| class | Coro |
| Coroutine type used to define a coroutine function. More... | |
| struct | BufferInfo |
| Information about buffers consumed from a provided buffer queue. More... | |
| class | ProvidedBufferQueue |
| Provided buffer queue. More... | |
| struct | ProvidedBuffer |
| Provided buffer. More... | |
| class | ProvidedBufferPool |
| Provided buffer pool. More... | |
| class | FdTable |
| File descriptor table for io_uring. More... | |
| class | BufferTable |
| Buffer table for io_uring. More... | |
| class | RingSettings |
| Settings manager for io_uring. More... | |
| class | Runtime |
| The event loop runtime for executing asynchronous. More... | |
| struct | RuntimeOptions |
| Runtime options. More... | |
| class | Task |
| Coroutine task that runs concurrently in the runtime. More... | |
Typedefs | |
| template<typename Awaiter> | |
| using | RangedParallelAllAwaiter |
| Awaiter to wait for all operations in a range to complete. | |
| template<typename Awaiter> | |
| using | RangedParallelAnyAwaiter |
| Awaiter to wait for any operation in a range to complete. | |
| template<typename Awaiter> | |
| using | RangedWhenAllAwaiter |
| Awaiter to wait for all operations in a range to complete. | |
| template<typename Awaiter> | |
| using | RangedWhenAnyAwaiter |
| Awaiter to wait for any operation in a range to complete. | |
| template<typename Awaiter> | |
| using | RangedLinkAwaiter = RangedLinkAwaiterBase<IOSQE_IO_LINK, Awaiter> |
| Awaiter that links multiple operations in a range using IO_LINK. | |
| template<typename Awaiter> | |
| using | RangedHardLinkAwaiter = RangedLinkAwaiterBase<IOSQE_IO_HARDLINK, Awaiter> |
| Awaiter that links multiple operations in a range using IO_HARDLINK. | |
| template<typename... Awaiter> | |
| using | ParallelAllAwaiter |
| Awaiter to wait for all operations to complete in parallel. | |
| template<typename... Awaiter> | |
| using | ParallelAnyAwaiter |
| Awaiter to wait for any operation to complete in parallel. | |
| template<typename... Awaiter> | |
| using | WhenAllAwaiter |
| Awaiter that waits for all operations to complete in parallel. | |
| template<typename... Awaiter> | |
| using | WhenAnyAwaiter |
| Awaiter that waits for any operation to complete in parallel. | |
| template<typename... Awaiter> | |
| using | LinkAwaiter = LinkAwaiterBase<IOSQE_IO_LINK, Awaiter...> |
| Awaiter that links multiple operations using IO_LINK. | |
| template<typename... Awaiter> | |
| using | HardLinkAwaiter = LinkAwaiterBase<IOSQE_IO_HARDLINK, Awaiter...> |
| Awaiter that links multiple operations using IO_HARDLINK. | |
Functions | |
| template<FdLike Fd1, FdLike Fd2> | |
| auto | async_splice (Fd1 fd_in, int64_t off_in, Fd2 fd_out, int64_t off_out, unsigned int nbytes, unsigned int splice_flags) |
| See io_uring_prep_splice. | |
| template<FdLike Fd1, FdLike Fd2> | |
| auto | async_tee (Fd1 fd_in, Fd2 fd_out, unsigned int nbytes, unsigned int splice_flags) |
| See io_uring_prep_tee. | |
| template<FdLike Fd> | |
| auto | async_readv (Fd fd, const struct iovec *iovecs, unsigned nr_vecs, __u64 offset, int flags) |
| See io_uring_prep_readv2. | |
| template<FdLike Fd> | |
| auto | async_readv (Fd fd, detail::FixedBuffer< const iovec * > iovecs, unsigned nr_vecs, __u64 offset, int flags) |
| See io_uring_prep_readv2. | |
| template<FdLike Fd> | |
| auto | async_writev (Fd fd, const struct iovec *iovecs, unsigned int nr_vecs, __u64 offset, int flags) |
| See io_uring_prep_writev2. | |
| template<FdLike Fd> | |
| auto | async_writev (Fd fd, detail::FixedBuffer< const iovec * > iovecs, unsigned int nr_vecs, __u64 offset, int flags) |
| See io_uring_prep_writev2. | |
| template<FdLike Fd> | |
| auto | async_recvmsg (Fd fd, struct msghdr *msg, unsigned flags) |
| See io_uring_prep_recvmsg. | |
| template<FdLike Fd, typename MultiShotFunc, NotBundledBufferRing Buffer> | |
| auto | async_recvmsg_multishot (Fd fd, struct msghdr *msg, unsigned flags, Buffer &buf, MultiShotFunc &&func) |
| See io_uring_prep_recvmsg_multishot. | |
| template<FdLike Fd> | |
| auto | async_sendmsg (Fd fd, const struct msghdr *msg, unsigned flags) |
| See io_uring_prep_sendmsg. | |
| template<FdLike Fd, typename FreeFunc> | |
| auto | async_sendmsg_zc (Fd fd, const struct msghdr *msg, unsigned flags, FreeFunc &&func) |
| See io_uring_prep_sendmsg_zc. | |
| template<FdLike Fd, typename FreeFunc> | |
| auto | async_sendmsg_zc (Fd fd, detail::FixedBuffer< const msghdr * > msg, unsigned flags, FreeFunc &&func) |
| See io_uring_prep_sendmsg_zc_fixed. | |
| template<FdLike Fd> | |
| auto | async_fsync (Fd fd, unsigned fsync_flags) |
| See io_uring_prep_fsync. | |
| auto | async_nop () |
| See io_uring_prep_nop. | |
| auto | async_nop128 () |
| See io_uring_prep_nop128. | |
| auto | async_timeout (struct __kernel_timespec *ts, unsigned count, unsigned flags) |
| See io_uring_prep_timeout. | |
| template<typename MultiShotFunc> | |
| auto | async_timeout_multishot (struct __kernel_timespec *ts, unsigned count, unsigned flags, MultiShotFunc &&func) |
| See io_uring_prep_timeout. | |
| template<FdLike Fd> | |
| auto | async_accept (Fd fd, struct sockaddr *addr, socklen_t *addrlen, int flags) |
| See io_uring_prep_accept. | |
| template<FdLike Fd> | |
| auto | async_accept_direct (Fd fd, struct sockaddr *addr, socklen_t *addrlen, int flags, unsigned int file_index) |
| See io_uring_prep_accept_direct. | |
| template<FdLike Fd, typename MultiShotFunc> | |
| auto | async_multishot_accept (Fd fd, struct sockaddr *addr, socklen_t *addrlen, int flags, MultiShotFunc &&func) |
| See io_uring_prep_multishot_accept. | |
| template<FdLike Fd, typename MultiShotFunc> | |
| auto | async_multishot_accept_direct (Fd fd, struct sockaddr *addr, socklen_t *addrlen, int flags, MultiShotFunc &&func) |
| See io_uring_prep_multishot_accept_direct. | |
| template<FdLike Fd> | |
| auto | async_cancel_fd (Fd fd, unsigned int flags) |
| See io_uring_prep_cancel_fd. | |
| auto | async_link_timeout (struct __kernel_timespec *ts, unsigned flags) |
| See io_uring_prep_link_timeout. | |
| template<FdLike Fd> | |
| auto | async_connect (Fd fd, const struct sockaddr *addr, socklen_t addrlen) |
| See io_uring_prep_connect. | |
| auto | async_files_update (int *fds, unsigned nr_fds, int offset) |
| See io_uring_prep_files_update. | |
| template<FdLike Fd> | |
| auto | async_fallocate (Fd fd, int mode, __u64 offset, __u64 len) |
| See io_uring_prep_fallocate. | |
| auto | async_openat (int dfd, const char *path, int flags, mode_t mode) |
| See io_uring_prep_openat. | |
| auto | async_openat_direct (int dfd, const char *path, int flags, mode_t mode, unsigned file_index) |
| See io_uring_prep_openat_direct. | |
| auto | async_open (const char *path, int flags, mode_t mode) |
| See io_uring_prep_openat. | |
| auto | async_open_direct (const char *path, int flags, mode_t mode, unsigned file_index) |
| See io_uring_prep_openat_direct. | |
| auto | async_close (int fd) |
| See io_uring_prep_close. | |
| auto | async_close (detail::FixedFd fd) |
| See io_uring_prep_close_direct. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_read (Fd fd, Buffer &&buf, __u64 offset) |
| See io_uring_prep_read. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_read (Fd fd, detail::FixedBuffer< Buffer > buf, __u64 offset) |
| See io_uring_prep_read_fixed. | |
| template<FdLike Fd, NotBundledBufferRing Buffer> | |
| auto | async_read (Fd fd, Buffer &buf, __u64 offset) |
| See io_uring_prep_read. | |
| template<FdLike Fd, NotBundledBufferRing Buffer, typename MultiShotFunc> | |
| auto | async_read_multishot (Fd fd, Buffer &buf, __u64 offset, MultiShotFunc &&func) |
| See io_uring_prep_read_multishot. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_write (Fd fd, Buffer &&buf, __u64 offset) |
| See io_uring_prep_write. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_write (Fd fd, detail::FixedBuffer< Buffer > buf, __u64 offset) |
| See io_uring_prep_write_fixed. | |
| auto | async_statx (int dfd, const char *path, int flags, unsigned mask, struct statx *statxbuf) |
| See io_uring_prep_statx. | |
| template<FdLike Fd> | |
| auto | async_fadvise (Fd fd, __u64 offset, off_t len, int advice) |
| See io_uring_prep_fadvise. | |
| template<FdLike Fd> | |
| auto | async_fadvise64 (Fd fd, __u64 offset, off_t len, int advice) |
| See io_uring_prep_fadvise64. | |
| auto | async_madvise (void *addr, __u32 length, int advice) |
| See io_uring_prep_madvise. | |
| auto | async_madvise64 (void *addr, off_t length, int advice) |
| See io_uring_prep_madvise64. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_send (Fd sockfd, Buffer &&buf, int flags) |
| See io_uring_prep_send. | |
| template<FdLike Fd> | |
| auto | async_send (Fd sockfd, ProvidedBufferQueue &buf, int flags) |
| See io_uring_prep_send. | |
| template<FdLike Fd> | |
| auto | async_send (Fd sockfd, BundledProvidedBufferQueue &buf, int flags) |
| See io_uring_prep_send. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_sendto (Fd sockfd, Buffer &&buf, int flags, const struct sockaddr *addr, socklen_t addrlen) |
| See io_uring_prep_send and io_uring_prep_send_set_addr. | |
| template<FdLike Fd> | |
| auto | async_sendto (Fd sockfd, ProvidedBufferQueue &buf, int flags, const struct sockaddr *addr, socklen_t addrlen) |
| See io_uring_prep_send and io_uring_prep_send_set_addr. | |
| template<FdLike Fd> | |
| auto | async_sendto (Fd sockfd, BundledProvidedBufferQueue &buf, int flags, const struct sockaddr *addr, socklen_t addrlen) |
| See io_uring_prep_send and io_uring_prep_send_set_addr. | |
| template<FdLike Fd, typename Buffer, typename FreeFunc> | |
| auto | async_send_zc (Fd sockfd, Buffer &&buf, int flags, unsigned zc_flags, FreeFunc &&func) |
| See io_uring_prep_send_zc. | |
| template<FdLike Fd, BufferLike Buffer, typename FreeFunc> | |
| auto | async_send_zc (Fd sockfd, detail::FixedBuffer< Buffer > buf, int flags, unsigned zc_flags, FreeFunc &&func) |
| See io_uring_prep_send_zc_fixed. | |
| template<FdLike Fd, BufferLike Buffer, typename FreeFunc> | |
| auto | async_sendto_zc (Fd sockfd, Buffer &&buf, int flags, const struct sockaddr *addr, socklen_t addrlen, unsigned zc_flags, FreeFunc &&func) |
| See io_uring_prep_send_zc and io_uring_prep_send_set_addr. | |
| template<FdLike Fd, BufferLike Buffer, typename FreeFunc> | |
| auto | async_sendto_zc (Fd sockfd, detail::FixedBuffer< Buffer > buf, int flags, const struct sockaddr *addr, socklen_t addrlen, unsigned zc_flags, FreeFunc &&func) |
| See io_uring_prep_send_zc_fixed and io_uring_prep_send_set_addr. | |
| template<FdLike Fd, BufferLike Buffer> | |
| auto | async_recv (Fd sockfd, Buffer &&buf, int flags) |
| See io_uring_prep_recv. | |
| template<FdLike Fd, NotBundledBufferRing Buffer> | |
| auto | async_recv (Fd sockfd, Buffer &buf, int flags) |
| See io_uring_prep_recv. | |
| template<FdLike Fd, BundledBufferRing Buffer> | |
| auto | async_recv (Fd sockfd, Buffer &buf, int flags) |
| See io_uring_prep_recv. | |
| template<FdLike Fd, NotBundledBufferRing Buffer, typename MultiShotFunc> | |
| auto | async_recv_multishot (Fd sockfd, Buffer &buf, int flags, MultiShotFunc &&func) |
| See io_uring_prep_recv_multishot. | |
| template<FdLike Fd, BundledBufferRing Buffer, typename MultiShotFunc> | |
| auto | async_recv_multishot (Fd sockfd, Buffer &buf, int flags, MultiShotFunc &&func) |
| See io_uring_prep_recv_multishot. | |
| auto | async_openat2 (int dfd, const char *path, struct open_how *how) |
| See io_uring_prep_openat2. | |
| auto | async_openat2_direct (int dfd, const char *path, struct open_how *how, unsigned file_index) |
| See io_uring_prep_openat2_direct. | |
| template<FdLike Fd> | |
| auto | async_shutdown (Fd fd, int how) |
| See io_uring_prep_shutdown. | |
| auto | async_unlinkat (int dfd, const char *path, int flags) |
| See io_uring_prep_unlinkat. | |
| auto | async_unlink (const char *path, int flags) |
| See io_uring_prep_unlinkat. | |
| auto | async_renameat (int olddfd, const char *oldpath, int newdfd, const char *newpath, unsigned int flags) |
| See io_uring_prep_renameat. | |
| auto | async_rename (const char *oldpath, const char *newpath) |
| See io_uring_prep_renameat. | |
| template<FdLike Fd> | |
| auto | async_sync_file_range (Fd fd, unsigned len, __u64 offset, int flags) |
| See io_uring_prep_sync_file_range. | |
| auto | async_mkdirat (int dfd, const char *path, mode_t mode) |
| See io_uring_prep_mkdirat. | |
| auto | async_mkdir (const char *path, mode_t mode) |
| See io_uring_prep_mkdirat. | |
| auto | async_symlinkat (const char *target, int newdirfd, const char *linkpath) |
| See io_uring_prep_symlinkat. | |
| auto | async_symlink (const char *target, const char *linkpath) |
| See io_uring_prep_symlinkat. | |
| auto | async_linkat (int olddfd, const char *oldpath, int newdfd, const char *newpath, int flags) |
| See io_uring_prep_linkat. | |
| auto | async_link (const char *oldpath, const char *newpath, int flags) |
| See io_uring_prep_linkat. | |
| auto | async_getxattr (const char *name, char *value, const char *path, unsigned int len) |
| See io_uring_prep_getxattr. | |
| auto | async_setxattr (const char *name, const char *value, const char *path, int flags, unsigned int len) |
| See io_uring_prep_setxattr. | |
| auto | async_fgetxattr (int fd, const char *name, char *value, unsigned int len) |
| See io_uring_prep_fgetxattr. | |
| auto | async_fsetxattr (int fd, const char *name, const char *value, int flags, unsigned int len) |
| See io_uring_prep_fsetxattr. | |
| auto | async_socket (int domain, int type, int protocol, unsigned int flags) |
| See io_uring_prep_socket. | |
| auto | async_socket_direct (int domain, int type, int protocol, unsigned file_index, unsigned int flags) |
| See io_uring_prep_socket_direct. | |
| template<FdLike Fd> | |
| auto | async_cmd_sock (int cmd_op, Fd fd, int level, int optname, void *optval, int optlen) |
| See io_uring_prep_cmd_sock. | |
| template<FdLike Fd> | |
| auto | async_cmd_getsockname (Fd fd, struct sockaddr *sockaddr, socklen_t *sockaddr_len, int peer) |
| See io_uring_prep_cmd_getsockname. | |
| auto | async_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options, unsigned int flags) |
| See io_uring_prep_waitid. | |
| auto | async_futex_wake (uint32_t *futex, uint64_t val, uint64_t mask, uint32_t futex_flags, unsigned int flags) |
| See io_uring_prep_futex_wake. | |
| auto | async_futex_wait (uint32_t *futex, uint64_t val, uint64_t mask, uint32_t futex_flags, unsigned int flags) |
| See io_uring_prep_futex_wait. | |
| auto | async_futex_waitv (struct futex_waitv *futex, uint32_t nr_futex, unsigned int flags) |
| See io_uring_prep_futex_waitv. | |
| auto | async_fixed_fd_install (int fixed_fd, unsigned int flags) |
| See io_uring_prep_fixed_fd_install. | |
| auto | async_fixed_fd_send (FdTable &dst, int source_fd, int target_fd, unsigned int flags) |
| See io_uring_prep_msg_ring_fd. | |
| template<FdLike Fd> | |
| auto | async_ftruncate (Fd fd, loff_t len) |
| See io_uring_prep_ftruncate. | |
| template<FdLike Fd> | |
| auto | async_cmd_discard (Fd fd, uint64_t offset, uint64_t nbytes) |
| See io_uring_prep_cmd_discard. | |
| template<FdLike Fd> | |
| auto | async_bind (Fd fd, struct sockaddr *addr, socklen_t addrlen) |
| See io_uring_prep_bind. | |
| template<FdLike Fd> | |
| auto | async_listen (Fd fd, int backlog) |
| See io_uring_prep_listen. | |
| auto | async_epoll_ctl (int epfd, int fd, int op, struct epoll_event *ev) |
| See io_uring_prep_epoll_ctl. | |
| auto | async_epoll_wait (int fd, struct epoll_event *events, int maxevents, unsigned flags) |
| See io_uring_prep_epoll_wait. | |
| auto | async_pipe (int *fds, int pipe_flags) |
| See io_uring_prep_pipe. | |
| auto | async_pipe_direct (int *fds, int pipe_flags, unsigned int file_index) |
| See io_uring_prep_pipe_direct. | |
| template<typename Func, typename... Args> | |
| auto | make_op_awaiter (Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<typename Func, typename... Args> | |
| auto | make_op_awaiter128 (Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<typename MultiShotFunc, typename Func, typename... Args> | |
| auto | make_multishot_op_awaiter (MultiShotFunc &&multishot_func, Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<BufferRingLike Br, typename Func, typename... Args> | |
| auto | make_select_buffer_op_awaiter (Br *buffers, Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<typename MultiShotFunc, BufferRingLike Br, typename Func, typename... Args> | |
| auto | make_multishot_select_buffer_op_awaiter (MultiShotFunc &&multishot_func, Br *buffers, Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<BufferRingLike Br, typename Func, typename... Args> | |
| auto | make_bundle_select_buffer_op_awaiter (Br *buffers, Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<typename MultiShotFunc, BufferRingLike Br, typename Func, typename... Args> | |
| auto | make_multishot_bundle_select_buffer_op_awaiter (MultiShotFunc &&multishot_func, Br *buffers, Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<typename FreeFunc, typename Func, typename... Args> | |
| auto | make_zero_copy_op_awaiter (FreeFunc &&free_func, Func &&func, Args &&...args) |
| This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function. | |
| template<unsigned int Flags, AwaiterLike Awaiter> | |
| auto | flag (Awaiter &&awaiter) |
| Decorates an awaiter with specific io_uring sqe flags. | |
| template<AwaiterLike Awaiter> | |
| auto | drain (Awaiter &&awaiter) |
| Mark an awaiter as drain operation. | |
| template<AwaiterLike Awaiter> | |
| auto | always_async (Awaiter &&awaiter) |
| Mark an awaiter to always execute asynchronously. | |
| template<template< AwaiterLike... Awaiter > typename AwaiterType, AwaiterLike... Awaiter> | |
| auto | parallel (Awaiter &&...awaiters) |
| Compose multiple awaiters into a single awaiter that executes them in parallel. | |
| template<template< typename Awaiter > typename RangedAwaiterType, AwaiterRange Range> | |
| auto | parallel (Range &&range) |
| Compose multiple awaiters from a range into a single awaiter that executes them in parallel. | |
| template<AwaiterLike... Awaiters> | |
| auto | when_all (Awaiters &&...awaiters) |
| Compose multiple awaiters into a single awaiter that completes when all of them complete. | |
| template<AwaiterRange Range> | |
| auto | when_all (Range &&range) |
| Compose multiple awaiters from a range into a single awaiter that completes when all of them complete. | |
| template<AwaiterLike... Awaiters> | |
| auto | when_any (Awaiters &&...awaiters) |
| Compose multiple awaiters into a single awaiter that completes when any of them complete. | |
| template<AwaiterRange Range> | |
| auto | when_any (Range &&range) |
| Compose multiple awaiters from a range into a single awaiter that completes when any of them complete. | |
| template<AwaiterLike... Awaiters> | |
| auto | link (Awaiters &&...awaiters) |
| Compose multiple awaiters into a single awaiter that executes them in sequence. | |
| template<AwaiterRange Range> | |
| auto | link (Range &&range) |
| Compose multiple awaiters from a range into a single awaiter that executes them in sequence. | |
| template<AwaiterLike... Awaiters> | |
| auto | hard_link (Awaiters &&...awaiters) |
| Compose multiple awaiters into a single awaiter that executes them in sequence and continues even if one of them fails. | |
| template<AwaiterRange Range> | |
| auto | hard_link (Range &&range) |
| Compose multiple awaiters from a range into a single awaiter that executes them in sequence and continues even if one of them fails. | |
| MutableBuffer | buffer (void *data, size_t size) |
| Create a buffer object from various data sources. | |
| ConstBuffer | buffer (const void *data, size_t size) |
| Create a buffer object from various data sources. | |
| template<typename PodType, size_t N> | |
| MutableBuffer | buffer (PodType(&arr)[N]) |
| Create a buffer object from various data sources. | |
| template<typename PodType, size_t N> | |
| ConstBuffer | buffer (const PodType(&arr)[N]) |
| Create a buffer object from various data sources. | |
| template<typename PodType, size_t N> | |
| MutableBuffer | buffer (std::array< PodType, N > &arr) |
| Create a buffer object from various data sources. | |
| template<typename PodType, size_t N> | |
| ConstBuffer | buffer (const std::array< PodType, N > &arr) |
| Create a buffer object from various data sources. | |
| template<typename PodType> | |
| MutableBuffer | buffer (std::vector< PodType > &vec) |
| Create a buffer object from various data sources. | |
| template<typename PodType> | |
| ConstBuffer | buffer (const std::vector< PodType > &vec) |
| Create a buffer object from various data sources. | |
| MutableBuffer | buffer (std::string &str) |
| Create a buffer object from various data sources. | |
| ConstBuffer | buffer (const std::string &str) |
| Create a buffer object from various data sources. | |
| ConstBuffer | buffer (std::string_view strv) |
| Create a buffer object from various data sources. | |
| MutableBuffer | buffer (iovec &iov) |
| Create a buffer object from various data sources. | |
| template<typename CoroFunc> | |
| auto | will_spawn (CoroFunc &&coro) |
| Helper to build an invocable that spawns a coroutine on invocation. | |
| template<typename Channel> | |
| auto | will_push (Channel &channel) |
| Helper to build an invocable that pushes the result to a channel on invocation. | |
| auto | fixed (int fd) |
| Mark a file descriptor as fixed for io_uring operations. | |
| template<BufferLike Buffer> | |
| auto | fixed (int buf_index, Buffer &&buf) |
| Mark a buffer as fixed for io_uring operations. | |
| auto | fixed (int buf_index, const struct iovec *iov) |
| Mark iovecs as fixed for io_uring operations. | |
| auto | fixed (int buf_index, const struct msghdr *msg) |
| Mark msghdr as fixed for io_uring operations. | |
| auto & | bundled (ProvidedBufferPool &buffer) |
| Get the bundled variant of a provided buffer pool. This will enable buffer bundling feature of io_uring. | |
| auto & | bundled (ProvidedBufferQueue &buffer) |
| Get the bundled variant of a provided buffer queue. This will enable buffer bundling feature of io_uring. | |
| auto & | current_runtime () |
| Get the current runtime. | |
| template<typename T, typename Allocator> | |
| T | sync_wait (Runtime &runtime, Coro< T, Allocator > coro) |
| Synchronously wait for a coroutine to complete in the given runtime. | |
| RuntimeOptions & | default_runtime_options () |
| Get the default runtime options. This options will be used when using sync_wait without specifying runtime. | |
| template<typename T, typename Allocator> | |
| T | sync_wait (Coro< T, Allocator > coro) |
| Synchronously wait for a coroutine to complete using a default runtime. The runtime will be created and destroyed for each call. | |
| template<typename T, typename Allocator> | |
| Task< T, Allocator > | co_spawn (Runtime &runtime, Coro< T, Allocator > coro) |
| Spawn a coroutine as a task in the given runtime. | |
| template<typename T, typename Allocator> | |
| Task< T, Allocator > | co_spawn (Coro< T, Allocator > coro) |
| Spawn a coroutine as a task in the current runtime. | |
| detail::SwitchAwaiter | co_switch (Runtime &runtime) |
| Switch current coroutine task to the given runtime. | |
| template<typename Func> | |
| Defer | defer (Func &&func) |
| Defer the execution of a function until the current scope ends. | |
The main namespace for the Condy library.
All classes, functions, and types provided by the Condy library are encapsulated within this namespace.
| using condy::HardLinkAwaiter = LinkAwaiterBase<IOSQE_IO_HARDLINK, Awaiter...> |
Awaiter that links multiple operations using IO_HARDLINK.
An awaiter that links multiple operations using IO_HARDLINK.
| Awaiter | The types of the awaiters. |
Definition at line 500 of file awaiters.hpp.
| using condy::LinkAwaiter = LinkAwaiterBase<IOSQE_IO_LINK, Awaiter...> |
Awaiter that links multiple operations using IO_LINK.
An awaiter that links multiple operations using IO_LINK.
| Awaiter | The types of the awaiters. |
Definition at line 491 of file awaiters.hpp.
| using condy::ParallelAllAwaiter |
Awaiter to wait for all operations to complete in parallel.
An awaiter that waits for all operations to complete in parallel. Unlike WhenAllAwaiter, this awaiter will also return the order of completion.
| Awaiter | The types of the awaiters. |
Definition at line 414 of file awaiters.hpp.
| using condy::ParallelAnyAwaiter |
Awaiter to wait for any operation to complete in parallel.
An awaiter that waits for any operation to complete in parallel. Unlike WhenAnyAwaiter, this awaiter will return the order of completion of all operations and the result of each awaiter.
| Awaiter | The types of the awaiters. |
Definition at line 427 of file awaiters.hpp.
| using condy::RangedHardLinkAwaiter = RangedLinkAwaiterBase<IOSQE_IO_HARDLINK, Awaiter> |
Awaiter that links multiple operations in a range using IO_HARDLINK.
An awaiter that links multiple operations in a range using IO_HARDLINK.
| Awaiter | The type of the awaiters in the range. |
Definition at line 324 of file awaiters.hpp.
| using condy::RangedLinkAwaiter = RangedLinkAwaiterBase<IOSQE_IO_LINK, Awaiter> |
Awaiter that links multiple operations in a range using IO_LINK.
An awaiter that links multiple operations in a range using IO_LINK.
| Awaiter | The type of the awaiters in the range. |
Definition at line 314 of file awaiters.hpp.
| using condy::RangedParallelAllAwaiter |
Awaiter to wait for all operations in a range to complete.
An awaiter that waits for all operations in a range to complete. Unlike RangedWhenAllAwaiter, this awaiter will also return the order of completion.
| Awaiter | The type of the awaiters in the range. |
Definition at line 246 of file awaiters.hpp.
| using condy::RangedParallelAnyAwaiter |
Awaiter to wait for any operation in a range to complete.
An awaiter that waits for any operation in a range to complete. Unlike RangedWhenAnyAwaiter, this awaiter will return the order of completion of all operations and the result of each awaiter.
| Awaiter | The type of the awaiters in the range. |
Definition at line 259 of file awaiters.hpp.
| using condy::RangedWhenAllAwaiter |
Awaiter to wait for all operations in a range to complete.
An awaiter that waits for all operations in a range to complete.
| Awaiter | The type of the awaiters in the range. |
Definition at line 269 of file awaiters.hpp.
| using condy::RangedWhenAnyAwaiter |
Awaiter to wait for any operation in a range to complete.
An awaiter that waits for any operation in a range to complete.
| Awaiter | The type of the awaiters in the range. |
Definition at line 280 of file awaiters.hpp.
| using condy::WhenAllAwaiter |
Awaiter that waits for all operations to complete in parallel.
An awaiter that waits for all operations to complete in parallel.
| Awaiter | The types of the awaiters. |
Definition at line 437 of file awaiters.hpp.
| using condy::WhenAnyAwaiter |
Awaiter that waits for any operation to complete in parallel.
An awaiter that waits for any operation to complete in parallel.
| Awaiter | The types of the awaiters. |
Definition at line 449 of file awaiters.hpp.
| auto condy::always_async | ( | Awaiter && | awaiter | ) |
Mark an awaiter to always execute asynchronously.
| awaiter | The awaiter to decorate. |
Definition at line 178 of file awaiter_operations.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 107 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 123 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 156 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 141 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 91 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 170 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 99 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 115 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 149 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 163 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 132 of file buffers.hpp.
|
inline |
Create a buffer object from various data sources.
These overloaded functions construct either MutableBuffer or ConstBuffer from raw pointers, arrays, std::array, std::vector, std::string, std::string_view, or iovec. They provide a unified way to convert different types of memory regions into buffer objects for use in asynchronous operations.
Definition at line 84 of file buffers.hpp.
|
inline |
Get the bundled variant of a provided buffer pool. This will enable buffer bundling feature of io_uring.
| buffer | The provided buffer pool. |
Definition at line 146 of file helpers.hpp.
|
inline |
Get the bundled variant of a provided buffer queue. This will enable buffer bundling feature of io_uring.
| buffer | The provided buffer queue. |
Definition at line 156 of file helpers.hpp.
|
inline |
Spawn a coroutine as a task in the current runtime.
| T | Return type of the coroutine. |
| Allocator | Allocator type used for memory management. |
| coro | The coroutine to be spawned. |
| std::logic_error | If there is no current runtime. |
|
inline |
Spawn a coroutine as a task in the given runtime.
| T | Return type of the coroutine. |
| Allocator | Allocator type used for memory management. |
| runtime | The runtime to spawn the coroutine in. |
| coro | The coroutine to be spawned. |
This function schedules the given coroutine to run as a task in the specified runtime. The coroutine will be executed concurrently in the runtime.
|
inline |
Switch current coroutine task to the given runtime.
| runtime | The runtime to switch to. |
This function suspends the current coroutine and reschedules it to run in the specified runtime. The caller coroutine will be resumed in the target runtime.
|
inline |
Get the current runtime.
Definition at line 413 of file runtime.hpp.
|
inline |
Get the default runtime options. This options will be used when using sync_wait without specifying runtime.
Definition at line 41 of file sync_wait.hpp.
| Defer condy::defer | ( | Func && | func | ) |
| auto condy::drain | ( | Awaiter && | awaiter | ) |
Mark an awaiter as drain operation.
| awaiter | The awaiter to decorate. |
Definition at line 170 of file awaiter_operations.hpp.
| auto condy::fixed | ( | int | buf_index, |
| Buffer && | buf ) |
Mark a buffer as fixed for io_uring operations.
The async_* functions can identify the fixed buffer and set the appropriate flags for io_uring operations.
| Buffer | Type of the buffer. |
| buf | The buffer to be marked as fixed. |
| buf_index | The index in the registered buffer table. |
Definition at line 109 of file helpers.hpp.
|
inline |
Mark iovecs as fixed for io_uring operations.
The async_* functions can identify the fixed iovec buffer and set the appropriate flags for io_uring operations.
| buf_index | The index in the registered buffer table. |
| iov | Pointer to the iovec array. |
Definition at line 121 of file helpers.hpp.
|
inline |
Mark msghdr as fixed for io_uring operations.
The async_* functions can identify the fixed msghdr buffer and set the appropriate flags for io_uring operations.
| buf_index | The index in the registered buffer table. |
| msg | Pointer to the msghdr structure. |
Definition at line 133 of file helpers.hpp.
|
inline |
Mark a file descriptor as fixed for io_uring operations.
The async_* functions can identify the fixed file descriptor and set the appropriate flags for io_uring operations.
| fd | The file descriptor to be marked as fixed. A fixed file descriptor points to the index in the registered file descriptor table. |
Definition at line 98 of file helpers.hpp.
| auto condy::flag | ( | Awaiter && | awaiter | ) |
Decorates an awaiter with specific io_uring sqe flags.
| Flags | The io_uring sqe flags to set. |
| awaiter | The awaiter to decorate. |
Definition at line 161 of file awaiter_operations.hpp.
| auto condy::hard_link | ( | Awaiters &&... | awaiters | ) |
Compose multiple awaiters into a single awaiter that executes them in sequence and continues even if one of them fails.
| Awaiters | Types of the awaiters to compose. |
| awaiters | The awaiters to compose. |
Definition at line 290 of file awaiter_operations.hpp.
| auto condy::hard_link | ( | Range && | range | ) |
Compose multiple awaiters from a range into a single awaiter that executes them in sequence and continues even if one of them fails.
| Range | Type of the range containing the awaiters. |
| range | The range of awaiters to compose. |
Definition at line 301 of file awaiter_operations.hpp.
| auto condy::link | ( | Awaiters &&... | awaiters | ) |
Compose multiple awaiters into a single awaiter that executes them in sequence.
| Awaiters | Types of the awaiters to compose. |
| awaiters | The awaiters to compose. |
Definition at line 268 of file awaiter_operations.hpp.
| auto condy::link | ( | Range && | range | ) |
Compose multiple awaiters from a range into a single awaiter that executes them in sequence.
| Range | Type of the range containing the awaiters. |
| range | The range of awaiters to compose. |
Definition at line 279 of file awaiter_operations.hpp.
| auto condy::make_bundle_select_buffer_op_awaiter | ( | Br * | buffers, |
| Func && | func, | ||
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 103 of file awaiter_operations.hpp.
| auto condy::make_multishot_bundle_select_buffer_op_awaiter | ( | MultiShotFunc && | multishot_func, |
| Br * | buffers, | ||
| Func && | func, | ||
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 123 of file awaiter_operations.hpp.
| auto condy::make_multishot_op_awaiter | ( | MultiShotFunc && | multishot_func, |
| Func && | func, | ||
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 52 of file awaiter_operations.hpp.
| auto condy::make_multishot_select_buffer_op_awaiter | ( | MultiShotFunc && | multishot_func, |
| Br * | buffers, | ||
| Func && | func, | ||
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 83 of file awaiter_operations.hpp.
| auto condy::make_op_awaiter128 | ( | Func && | func, |
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 38 of file awaiter_operations.hpp.
| auto condy::make_select_buffer_op_awaiter | ( | Br * | buffers, |
| Func && | func, | ||
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 67 of file awaiter_operations.hpp.
| auto condy::make_zero_copy_op_awaiter | ( | FreeFunc && | free_func, |
| Func && | func, | ||
| Args &&... | args ) |
This function creates a variant of OpAwaiter. OpAwaiter represents an asynchronous operation that can be awaited. It is basically a wrapper around an io_uring sqe preparation function.
Definition at line 143 of file awaiter_operations.hpp.
| auto condy::parallel | ( | Awaiter &&... | awaiters | ) |
Compose multiple awaiters into a single awaiter that executes them in parallel.
| AwaiterType | Awaiter template to use for composing the awaiters. |
| Awaiter | Types of the awaiters to compose. |
| awaiters | The awaiters to compose. |
Definition at line 192 of file awaiter_operations.hpp.
| auto condy::parallel | ( | Range && | range | ) |
Compose multiple awaiters from a range into a single awaiter that executes them in parallel.
| RangedAwaiterType | Awaiter template to use for composing the awaiters. |
| Range | Type of the range containing the awaiters. |
| range | The range of awaiters to compose. |
Definition at line 207 of file awaiter_operations.hpp.
| T condy::sync_wait | ( | Coro< T, Allocator > | coro | ) |
Synchronously wait for a coroutine to complete using a default runtime. The runtime will be created and destroyed for each call.
| T | Type of the coroutine result. |
| Allocator | Allocator type used for memory management. |
| coro | The coroutine to be run. |
Definition at line 55 of file sync_wait.hpp.
| T condy::sync_wait | ( | Runtime & | runtime, |
| Coro< T, Allocator > | coro ) |
Synchronously wait for a coroutine to complete in the given runtime.
| T | Type of the coroutine result. |
| Allocator | Allocator type used for memory management. |
| runtime | The runtime to run the coroutine in. |
| coro | The coroutine to be run. |
Definition at line 24 of file sync_wait.hpp.
| auto condy::when_all | ( | Awaiters &&... | awaiters | ) |
Compose multiple awaiters into a single awaiter that completes when all of them complete.
| Awaiters | Types of the awaiters to compose. |
| awaiters | The awaiters to compose. |
Definition at line 222 of file awaiter_operations.hpp.
| auto condy::when_all | ( | Range && | range | ) |
Compose multiple awaiters from a range into a single awaiter that completes when all of them complete.
| Range | Type of the range containing the awaiters. |
| range | The range of awaiters to compose. |
Definition at line 233 of file awaiter_operations.hpp.
| auto condy::when_any | ( | Awaiters &&... | awaiters | ) |
Compose multiple awaiters into a single awaiter that completes when any of them complete.
| Awaiters | Types of the awaiters to compose. |
| awaiters | The awaiters to compose. |
Definition at line 246 of file awaiter_operations.hpp.
| auto condy::when_any | ( | Range && | range | ) |
Compose multiple awaiters from a range into a single awaiter that completes when any of them complete.
| Range | Type of the range containing the awaiters. |
| range | The range of awaiters to compose. |
Definition at line 257 of file awaiter_operations.hpp.
Helper to build an invocable that pushes the result to a channel on invocation.
| Channel | Type of the channel. |
| channel | The channel to push to. |
The use case of this helper is to pass the invocable to an async operation that accepts a completion callback. For example, async_read_multishot().
Definition at line 72 of file helpers.hpp.
| auto condy::will_spawn | ( | CoroFunc && | coro | ) |
Helper to build an invocable that spawns a coroutine on invocation.
| CoroFunc | Type of the coroutine function. |
| coro | The coroutine function to be spawned. |
The use case of this helper is to pass the invocable to an async operation that accepts a completion callback. For example, async_multishot_accept().
Definition at line 57 of file helpers.hpp.