summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 01:42:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 01:42:38 +0000
commit1f003810c22ca758bcf9c83b2f1f4755d74c47e1 (patch)
tree72fcb2d6255c95ed6d0dcefe2461d5b826482de5 /thread_pthread.c
parent75ffce28637a0d0d510dcd99ba90df38000b4be5 (diff)
thread_pthread.c: cast inside rb_thread_create_mjit_thread
* thread_pthread.c (rb_thread_create_mjit_thread): cast worker_func pointer to void pointer inside. adjusted to the declaration in mjit.c and the definition in thread_win32.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 1a6cf0c768..3735283c28 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1791,7 +1791,7 @@ mjit_worker(void *arg)
/* Launch MJIT thread. Returns FALSE if it fails to create thread. */
int
-rb_thread_create_mjit_thread(void (*child_hook)(void), void *worker_func)
+rb_thread_create_mjit_thread(void (*child_hook)(void), void (*worker_func)(void))
{
pthread_attr_t attr;
pthread_t worker_pid;
@@ -1799,7 +1799,7 @@ rb_thread_create_mjit_thread(void (*child_hook)(void), void *worker_func)
pthread_atfork(NULL, NULL, child_hook);
if (pthread_attr_init(&attr) == 0
&& pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0
- && pthread_create(&worker_pid, &attr, mjit_worker, worker_func) == 0) {
+ && pthread_create(&worker_pid, &attr, mjit_worker, (void *)worker_func) == 0) {
/* jit_worker thread is not to be joined */
pthread_detach(worker_pid);
return TRUE;