diff options
| author | Jun Aruga <jaruga@redhat.com> | 2025-09-04 18:59:42 +0100 |
|---|---|---|
| committer | Jun Aruga <junaruga@users.noreply.github.com> | 2025-09-16 11:37:26 +0100 |
| commit | 971174054a26be0a4becbe7c67a7cc980158abf2 (patch) | |
| tree | 41ee6cf7f3f32cce1de99f967dba24f2467e50c4 /test/ruby/test_method_cache.rb | |
| parent | 1213adfe5526d65cce81a9fb127074130c8faea7 (diff) | |
Add a macro to manage the condition of no-inline version rb_current_ec
Add the macro `RB_THREAD_CURRENT_EC_NOINLINE` to manage the condition to use
no-inline version rb_current_ec for a better maintainability.
Note that the `vm_core.h` includes the `THREAD_IMPL_H` by the
`#include THREAD_IMPL_H`. The `THREAD_IMPL_H` can be `thread_none.h`,
`thread_pthread.h` or `thread_win32.h` according to the
`tool/m4/ruby_thread.m4` creating the `THREAD_IMPL_H`.
The change in this commit only defining the `RB_THREAD_CURRENT_EC_NOINLINE` in
the `thread_pthread.h` is okay in this situation. Because in the
`thread_none.h` case, the thread feature is not used at all, including
Thread-Local Storage (TLS), and in the `thread_win32.h` case, the
`RB_THREAD_LOCAL_SPECIFIER` is not defined. In the `thread_pthread.h` case, the
`RB_THREAD_LOCAL_SPECIFIER` is defined in the `configure.ac`. In the
`thread_none.h` case, the `RB_THREAD_LOCAL_SPECIFIER` is defined in the
`thread_none.h`.
Diffstat (limited to 'test/ruby/test_method_cache.rb')
0 files changed, 0 insertions, 0 deletions
