@@ -31,7 +31,7 @@ void jl_mach_gc_end(void)
31
31
int8_t gc_state = (int8_t )(item >> 8 );
32
32
jl_ptls_t ptls2 = jl_all_tls_states [tid ];
33
33
jl_atomic_store_release (& ptls2 -> gc_state , gc_state );
34
- thread_resume (pthread_mach_thread_np (ptls2 -> system_id ));
34
+ thread_resume (pthread_mach_thread_np (( pthread_t ) ptls2 -> system_id ));
35
35
}
36
36
suspended_threads .len = 0 ;
37
37
}
@@ -101,7 +101,7 @@ static void allocate_segv_handler()
101
101
}
102
102
pthread_attr_destroy (& attr );
103
103
for (int16_t tid = 0 ;tid < jl_n_threads ;tid ++ ) {
104
- attach_exception_port (pthread_mach_thread_np (jl_all_tls_states [tid ]-> system_id ), 0 );
104
+ attach_exception_port (pthread_mach_thread_np (( pthread_t ) jl_all_tls_states [tid ]-> system_id ), 0 );
105
105
}
106
106
}
107
107
@@ -178,7 +178,7 @@ kern_return_t catch_exception_raise(mach_port_t exception_port,
178
178
jl_ptls_t ptls2 = NULL ;
179
179
for (tid = 0 ;tid < jl_n_threads ;tid ++ ) {
180
180
jl_ptls_t _ptls2 = jl_all_tls_states [tid ];
181
- if (pthread_mach_thread_np (_ptls2 -> system_id ) == thread ) {
181
+ if (pthread_mach_thread_np (( pthread_t ) _ptls2 -> system_id ) == thread ) {
182
182
ptls2 = _ptls2 ;
183
183
break ;
184
184
}
@@ -269,7 +269,7 @@ static void attach_exception_port(thread_port_t thread, int segv_only)
269
269
static void jl_thread_suspend_and_get_state (int tid , unw_context_t * * ctx )
270
270
{
271
271
jl_ptls_t ptls2 = jl_all_tls_states [tid ];
272
- mach_port_t tid_port = pthread_mach_thread_np (ptls2 -> system_id );
272
+ mach_port_t tid_port = pthread_mach_thread_np (( pthread_t ) ptls2 -> system_id );
273
273
274
274
kern_return_t ret = thread_suspend (tid_port );
275
275
HANDLE_MACH_ERROR ("thread_suspend" , ret );
@@ -289,7 +289,7 @@ static void jl_thread_suspend_and_get_state(int tid, unw_context_t **ctx)
289
289
static void jl_thread_resume (int tid , int sig )
290
290
{
291
291
jl_ptls_t ptls2 = jl_all_tls_states [tid ];
292
- mach_port_t thread = pthread_mach_thread_np (ptls2 -> system_id );
292
+ mach_port_t thread = pthread_mach_thread_np (( pthread_t ) ptls2 -> system_id );
293
293
kern_return_t ret = thread_resume (thread );
294
294
HANDLE_MACH_ERROR ("thread_resume" , ret );
295
295
}
@@ -299,7 +299,7 @@ static void jl_thread_resume(int tid, int sig)
299
299
static void jl_try_deliver_sigint (void )
300
300
{
301
301
jl_ptls_t ptls2 = jl_all_tls_states [0 ];
302
- mach_port_t thread = pthread_mach_thread_np (ptls2 -> system_id );
302
+ mach_port_t thread = pthread_mach_thread_np (( pthread_t ) ptls2 -> system_id );
303
303
304
304
kern_return_t ret = thread_suspend (thread );
305
305
HANDLE_MACH_ERROR ("thread_suspend" , ret );
@@ -328,7 +328,7 @@ static void jl_try_deliver_sigint(void)
328
328
static void jl_exit_thread0 (int exitstate )
329
329
{
330
330
jl_ptls_t ptls2 = jl_all_tls_states [0 ];
331
- mach_port_t thread = pthread_mach_thread_np (ptls2 -> system_id );
331
+ mach_port_t thread = pthread_mach_thread_np (( pthread_t ) ptls2 -> system_id );
332
332
kern_return_t ret = thread_suspend (thread );
333
333
HANDLE_MACH_ERROR ("thread_suspend" , ret );
334
334
0 commit comments