rb_thread_sched_destroy is not used now at all

This commit is contained in:
Nobuyoshi Nakada 2024-03-22 18:53:44 +09:00
parent 127d7a35df
commit e2a9b87126
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
3 changed files with 4 additions and 1 deletions

View File

@ -259,7 +259,6 @@ timeout_prepare(rb_hrtime_t **to, rb_hrtime_t *rel, rb_hrtime_t *end,
}
MAYBE_UNUSED(NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start)));
MAYBE_UNUSED(static void rb_thread_sched_destroy(struct rb_thread_sched *sched));
MAYBE_UNUSED(static bool th_has_dedicated_nt(const rb_thread_t *th));
MAYBE_UNUSED(static int waitfd_to_waiting_flag(int wfd_event));

View File

@ -46,10 +46,12 @@ rb_thread_sched_init(struct rb_thread_sched *sched, bool atfork)
{
}
#if 0
static void
rb_thread_sched_destroy(struct rb_thread_sched *sched)
{
}
#endif
// Do nothing for mutex guard
void

View File

@ -155,6 +155,7 @@ rb_thread_sched_init(struct rb_thread_sched *sched, bool atfork)
sched->lock = w32_mutex_create();
}
#if 0
// per-ractor
void
rb_thread_sched_destroy(struct rb_thread_sched *sched)
@ -162,6 +163,7 @@ rb_thread_sched_destroy(struct rb_thread_sched *sched)
if (GVL_DEBUG) fprintf(stderr, "sched destroy\n");
CloseHandle(sched->lock);
}
#endif
rb_thread_t *
ruby_thread_from_native(void)