Condy v1.7.0
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
condy::RuntimeOptions Struct Reference

Runtime options. More...

#include <runtime_options.hpp>

Public Member Functions

Self & event_interval (size_t v)
 Set event interval.
Self & disable_register_ring_fd ()
 Disable register ring fd.
Self & enable_iopoll ()
 See IORING_SETUP_IOPOLL.
Self & enable_hybrid_iopoll ()
 See IORING_SETUP_HYBRID_IOPOLL.
Self & enable_sqpoll (size_t idle_time_ms=1000, std::optional< uint32_t > cpu=std::nullopt)
 See IORING_SETUP_SQPOLL.
Self & enable_defer_taskrun ()
 See IORING_SETUP_DEFER_TASKRUN and IORING_SETUP_TASKRUN_FLAG.
Self & sq_size (size_t v)
 Set SQ size.
Self & cq_size (size_t v)
 Set CQ size.
Self & submit_batch (size_t v)
 Set batch size for operation submission.
Self & enable_attach_wq (Runtime &other)
 See IORING_SETUP_ATTACH_WQ.
Self & enable_coop_taskrun ()
 See IORING_SETUP_COOP_TASKRUN and IORING_SETUP_TASKRUN_FLAG.
Self & enable_sqe128 ()
 See IORING_SETUP_SQE128.
Self & enable_cqe32 ()
 See IORING_SETUP_CQE32.
Self & enable_sqe_mixed ()
 See IORING_SETUP_SQE_MIXED.
Self & enable_cqe_mixed ()
 See IORING_SETUP_CQE_MIXED.
Self & enable_no_mmap (void *buf=nullptr, size_t buf_size=0)
 See IORING_SETUP_NO_MMAP.
Self & enable_sq_rewind ()
 See IORING_SETUP_SQ_REWIND.

Detailed Description

Runtime options.

Options for configuring the behavior of a Runtime instance. Most of them are io_uring setup options. These options should be set before creating the Runtime instance.

Definition at line 23 of file runtime_options.hpp.

Member Function Documentation

◆ cq_size()

Self & condy::RuntimeOptions::cq_size ( size_t v)
inline

Set CQ size.

Parameters
vCQ size

Definition at line 129 of file runtime_options.hpp.

◆ disable_register_ring_fd()

Self & condy::RuntimeOptions::disable_register_ring_fd ( )
inline

Disable register ring fd.

By default, the runtime registers the ring file descriptor with the kernel for performance optimization. This option disables that behavior.

Deprecated
This option is deprecated and will be removed in future versions.

Definition at line 48 of file runtime_options.hpp.

◆ enable_attach_wq()

Self & condy::RuntimeOptions::enable_attach_wq ( Runtime & other)
inline

See IORING_SETUP_ATTACH_WQ.

This option allows the current runtime to share the async worker thread backend with another runtime.

Parameters
otherThe other runtime to attach to.

Definition at line 148 of file runtime_options.hpp.

◆ enable_coop_taskrun()

Self & condy::RuntimeOptions::enable_coop_taskrun ( )
inline

See IORING_SETUP_COOP_TASKRUN and IORING_SETUP_TASKRUN_FLAG.

Returns
Self&

Definition at line 157 of file runtime_options.hpp.

◆ enable_defer_taskrun()

Self & condy::RuntimeOptions::enable_defer_taskrun ( )
inline

See IORING_SETUP_DEFER_TASKRUN and IORING_SETUP_TASKRUN_FLAG.

Returns
Self&

Definition at line 103 of file runtime_options.hpp.

◆ enable_no_mmap()

Self & condy::RuntimeOptions::enable_no_mmap ( void * buf = nullptr,
size_t buf_size = 0 )
inline

See IORING_SETUP_NO_MMAP.

Parameters
bufBuffer pointer
buf_sizeBuffer size

Definition at line 224 of file runtime_options.hpp.

◆ enable_sqpoll()

Self & condy::RuntimeOptions::enable_sqpoll ( size_t idle_time_ms = 1000,
std::optional< uint32_t > cpu = std::nullopt )
inline

See IORING_SETUP_SQPOLL.

Parameters
idle_time_msIdle time in milliseconds for the sqpoll thread
cpuCPU affinity for the sqpoll thread

Definition at line 80 of file runtime_options.hpp.

◆ event_interval()

Self & condy::RuntimeOptions::event_interval ( size_t v)
inline

Set event interval.

The event interval determines how often the runtime checks for completed events.

Parameters
vThe event interval value

Definition at line 33 of file runtime_options.hpp.

◆ sq_size()

Self & condy::RuntimeOptions::sq_size ( size_t v)
inline

Set SQ size.

Parameters
vSQ size

Definition at line 120 of file runtime_options.hpp.


The documentation for this struct was generated from the following file: