|
ThreadSchedule 2.0.0
Modern C++ thread management library
|
Process-wide thread registry, control blocks, and composite registry. More...
#include "expected.hpp"#include "scheduler_policy.hpp"#include "thread_wrapper.hpp"#include <functional>#include <memory>#include <mutex>#include <optional>#include <shared_mutex>#include <string>#include <thread>#include <tuple>#include <unordered_map>#include <utility>#include <vector>#include <pthread.h>#include <sched.h>#include <sys/types.h>Go to the source code of this file.
Classes | |
| struct | threadschedule::RegisteredThreadInfo |
| Snapshot of metadata for a single registered thread. More... | |
| class | threadschedule::ThreadControlBlock |
| Per-thread control handle for OS-level scheduling operations. More... | |
| class | threadschedule::detail::QueryFacadeMixin< Derived > |
| CRTP mixin that provides functional-style query facade methods. More... | |
| class | threadschedule::ThreadRegistry |
| Central registry of threads indexed by OS-level thread ID (Tid). More... | |
| class | threadschedule::ThreadRegistry::QueryView |
| Lazy, functional-style query/filter view over a snapshot of registered threads. More... | |
| class | threadschedule::CompositeThreadRegistry |
| Aggregates multiple ThreadRegistry instances into a single queryable view. More... | |
| class | threadschedule::AutoRegisterCurrentThread |
| RAII guard that registers the current thread on construction and unregisters it on destruction. More... | |
Namespaces | |
| namespace | threadschedule |
| namespace | threadschedule::detail |
Macros | |
| #define | THREADSCHEDULE_API |
Typedefs | |
| using | threadschedule::Tid = pid_t |
Enumerations | |
| enum class | threadschedule::BuildMode : std::uint8_t { threadschedule::HEADER_ONLY , threadschedule::RUNTIME } |
| Indicates whether the library was compiled in header-only or runtime (shared library) mode. More... | |
Functions | |
| auto | threadschedule::build_mode () -> BuildMode |
| Returns the build mode detected at compile time (header-only variant). | |
| auto | threadschedule::build_mode_string () -> char const * |
| Returns a human-readable C string describing the active build mode. | |
| auto | threadschedule::cgroup_attach_tid (std::string const &cgroupDir, Tid tid) -> expected< void, std::error_code > |
| Attaches a thread to a Linux cgroup by writing its TID to the appropriate control file. | |
Global registry access | |
These free functions provide access to a process-wide ThreadRegistry singleton and allow injecting a custom instance.
| |
| auto | threadschedule::registry () -> ThreadRegistry & |
| Returns a reference to the process-wide ThreadRegistry. | |
| void | threadschedule::set_external_registry (ThreadRegistry *reg) |
| Injects a custom ThreadRegistry as the global singleton. | |
Variables | |
| constexpr bool | threadschedule::is_runtime_build = false |
true when compiled with THREADSCHEDULE_RUNTIME. | |
Process-wide thread registry, control blocks, and composite registry.
Definition in file thread_registry.hpp.
| #define THREADSCHEDULE_API |
Definition at line 42 of file thread_registry.hpp.