26#ifndef MYSQLROUTER_IO_THREAD_AFFINITY_H
27#define MYSQLROUTER_IO_THREAD_AFFINITY_H
30#include <system_error>
35#elif defined(__FreeBSD__)
38#include <sys/cpuset.h>
51#if defined(__linux__) || defined(__FreeBSD__)
52 static constexpr const int max_cpus = CPU_SETSIZE;
54 static constexpr const int max_cpus = 64;
56 static constexpr const int max_cpus = 1024;
72 stdx::expected<
std::bitset<max_cpus>,
std::error_code> affinity()
76 stdx::expected<
void,
std::error_code> affinity(
manage thread affinity.
Definition: thread_affinity.h:49
ThreadAffinity(native_handle_type thread_id) noexcept
Definition: thread_affinity.h:65
pthread_t native_handle_type
Definition: thread_affinity.h:62
#define IO_COMPONENT_EXPORT
Definition: io_component_export.h:15
static my_thread_id thread_id
Definition: my_thr_init.cc:63
int native_handle_type
Definition: socket_constants.h:51
Definition: gcs_xcom_synode.h:64
#define HANDLE
Definition: violite.h:159