aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-06-15 10:57:37 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2022-06-15 10:57:38 -0700
commita327ce8b07e8778b838a5b82939bea9409cfa9f5 (patch)
tree49e10bf95d8f0648a543b7bf242d0908e46311f4 /thread_pthread.c
parent23459e4dbb736b28873a85637d141f77167cacee (diff)
downloadruby-a327ce8b07e8778b838a5b82939bea9409cfa9f5.tar.gz
Remove unused rb_thread_create_mjit_thread
follow up https://github.com/ruby/ruby/pull/6006
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 9b0dddd562..1f5b5b9030 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -2156,40 +2156,6 @@ rb_nativethread_self(void)
return pthread_self();
}
-#if USE_MJIT
-/* A function that wraps actual worker function, for pthread abstraction. */
-static void *
-mjit_worker(void *arg)
-{
- void (*worker_func)(void) = (void(*)(void))arg;
-
-#ifdef SET_CURRENT_THREAD_NAME
- SET_CURRENT_THREAD_NAME("ruby-mjitworker"); /* 16 byte including NUL */
-#endif
- worker_func();
- return NULL;
-}
-
-/* Launch MJIT thread. Returns FALSE if it fails to create thread. */
-int
-rb_thread_create_mjit_thread(void (*worker_func)(void))
-{
- pthread_attr_t attr;
- pthread_t worker_pid;
- int ret = FALSE;
-
- if (pthread_attr_init(&attr) != 0) return ret;
-
- /* jit_worker thread is not to be joined */
- if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0
- && pthread_create(&worker_pid, &attr, mjit_worker, (void *)worker_func) == 0) {
- ret = TRUE;
- }
- pthread_attr_destroy(&attr);
- return ret;
-}
-#endif
-
int
rb_sigwait_fd_get(const rb_thread_t *th)
{