Skip to content

Commit

Permalink
define rb_current_ec_set in all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
eightbitraptor committed Nov 23, 2024
1 parent 229b502 commit b5e8aca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ rb_gc_worker_thread_set_vm_context(struct rb_gc_vm_context *context)
GC_ASSERT(rb_current_execution_context(false) == NULL);

#ifdef RB_THREAD_LOCAL_SPECIFIER
# ifdef __APPLE__
rb_current_ec_set(context->ec);
# else
ruby_current_ec = context->ec;
# endif
#else
native_tls_set(ruby_current_ec_key, context->ec);
#endif
Expand All @@ -219,11 +215,7 @@ rb_gc_worker_thread_unset_vm_context(struct rb_gc_vm_context *context)
GC_ASSERT(rb_current_execution_context(true) == context->ec);

#ifdef RB_THREAD_LOCAL_SPECIFIER
# ifdef __APPLE__
rb_current_ec_set(NULL);
# else
ruby_current_ec = NULL;
# endif
#else
native_tls_set(ruby_current_ec_key, NULL);
#endif
Expand Down
6 changes: 0 additions & 6 deletions ractor_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,7 @@ static inline void
rb_ractor_set_current_ec_(rb_ractor_t *cr, rb_execution_context_t *ec, const char *file, int line)
{
#ifdef RB_THREAD_LOCAL_SPECIFIER

# ifdef __APPLE__
rb_current_ec_set(ec);
# else
ruby_current_ec = ec;
# endif

#else
native_tls_set(ruby_current_ec_key, ec);
#endif
Expand Down

0 comments on commit b5e8aca

Please sign in to comment.