Ruby
4.1.0dev (2026-09-07 revision b57404b461ba8bf34e802d86b0db78388216e182)
thread_none.h (b57404b461ba8bf34e802d86b0db78388216e182)
1
#ifndef RUBY_THREAD_NONE_H
2
#define RUBY_THREAD_NONE_H
3
4
#define RB_NATIVETHREAD_LOCK_INIT (void)(0)
5
#define RB_NATIVETHREAD_COND_INIT (void)(0)
6
7
// no-thread impl doesn't use TLS but define this to avoid using tls key
8
// based implementation in vm.c
9
#define RB_THREAD_LOCAL_SPECIFIER
10
11
// This model brings its own scheduler stubs (thread_none.c) instead of the
12
// common one; thread.c keys off this.
13
#define RB_THREAD_SCHED_NONE 1
14
15
// The scheduler's types are shared with the threaded platforms: the code that
16
// reads them (vm_sync.c, ractor.c, thread.c) is compiled for every thread
17
// model, so it needs the real fields even here, where nothing ever runs
18
// concurrently and they all stay zero. thread_none.c only ever passes the
19
// structs around, never looks inside them.
20
#include "thread_sched.h"
21
22
RUBY_EXTERN
struct
rb_execution_context_struct
*ruby_current_ec;
23
NOINLINE(
struct
rb_execution_context_struct
*rb_current_ec_noinline(
void
));
// for assertions
24
25
#endif
/* RUBY_THREAD_NONE_H */
RUBY_EXTERN
#define RUBY_EXTERN
Declaration of externally visible global variables.
Definition
dllexport.h:45
rb_execution_context_struct
Definition
vm_core.h:1086
Generated by
1.9.8