Condy v1.3.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 (bool hybrid=false)
 See IORING_SETUP_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 & 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_coop_taskrun (bool taskrun_flag)
 See IORING_SETUP_COOP_TASKRUN.
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.

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 102 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.

Definition at line 44 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 113 of file runtime_options.hpp.

◆ enable_coop_taskrun() [1/2]

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

See IORING_SETUP_COOP_TASKRUN and IORING_SETUP_TASKRUN_FLAG.

Returns
Self&

Definition at line 122 of file runtime_options.hpp.

◆ enable_coop_taskrun() [2/2]

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

See IORING_SETUP_COOP_TASKRUN.

Parameters
taskrun_flagSee IORING_SETUP_TASKRUN_FLAG
Returns
Self&
Deprecated
Use enable_coop_taskrun() without parameters instead

Definition at line 138 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 80 of file runtime_options.hpp.

◆ enable_iopoll()

Self & condy::RuntimeOptions::enable_iopoll ( bool hybrid = false)
inline

See IORING_SETUP_IOPOLL.

Parameters
hybridSee IORING_SETUP_HYBRID_IOPOLL

Definition at line 53 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 197 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 64 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 93 of file runtime_options.hpp.


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