24#include <seastar/core/preempt.hh>
25#include <seastar/util/std-compat.hh>
32using thread_clock = std::chrono::steady_clock;
36class scheduling_group;
39#ifdef SEASTAR_ASAN_ENABLED
41 void* fake_stack =
nullptr;
42 const void* stack_bottom;
48 thread_context* thread;
50 void initial_switch_in(ucontext_t* initial_context,
const void* stack_bottom,
size_t stack_size);
53 void initial_switch_in_completed();
54 void final_switch_out();
57extern thread_local jmp_buf_link* g_current_context;
59namespace thread_impl {
61inline thread_context* get() {
62 return g_current_context->thread;
65inline bool should_yield() {
73scheduling_group sched_group(
const thread_context*);
76void switch_in(thread_context* to);
77void switch_out(thread_context* from);
future yield() noexcept
Returns a future which is not ready but is scheduled to resolve soon.
Seastar API namespace.
Definition: abort_on_ebadf.hh:26