Commit 91fbdc0e authored by Jean-Claude Beaudoin's avatar Jean-Claude Beaudoin
Browse files

Get rid of tkill() call on Android.

parent f80f224a
......@@ -46,7 +46,7 @@ typedef struct MK_GC_Thread_Rep {
/* guaranteed to be dead, but we may */
/* not yet have registered the join.) */
pthread_t id;
# ifdef PLATFORM_ANDROID
# if 0 /* JCB */ && defined(PLATFORM_ANDROID)
pid_t kernel_id;
# endif
/* Extra bookkeeping information the stopping code uses */
......
......@@ -439,8 +439,9 @@ MK_GC_INNER void MK_GC_push_all_stacks(void)
int MK_GC_stopping_pid = 0;
#endif
#ifdef PLATFORM_ANDROID
extern int tkill(pid_t tid, int sig); /* from sys/linux-unistd.h */
#if 0 /* JCB */ && defined(PLATFORM_ANDROID)
/* I have no idea why this code was needed on Android at any time! Must be ancient... JCB 2020/05/12 */
extern int tkill(pid_t tid, int sig); /* from sys/linux-unistd.h */ /* No such file anymore! JCB */
static int android_thread_kill(pid_t tid, int sig)
{
......@@ -499,7 +500,7 @@ STATIC int MK_GC_suspend_all(void)
p -> stop_info.stack_ptr = (ptr_t)stack.ss_sp - stack.ss_size;
}
# else
# ifndef PLATFORM_ANDROID
# if 1 /* JCB */ || !defined(PLATFORM_ANDROID)
result = pthread_kill(p -> id, MK_GC_sig_suspend);
# else
result = android_thread_kill(p -> kernel_id, MK_GC_sig_suspend);
......@@ -835,7 +836,7 @@ MK_GC_INNER void MK_GC_start_world(void)
if (pthread_resume_np(p -> id) != 0)
ABORT("pthread_resume_np failed");
# else
# ifndef PLATFORM_ANDROID
# if 1 /* JCB */ || !defined(PLATFORM_ANDROID)
result = pthread_kill(p -> id, MK_GC_sig_thr_restart);
# else
result = android_thread_kill(p -> kernel_id,
......
......@@ -505,7 +505,7 @@ STATIC MK_GC_thread MK_GC_new_thread(pthread_t id)
if (result == 0) return(0);
}
result -> id = id;
# ifdef PLATFORM_ANDROID
# if 0 /* JCB */ && defined(PLATFORM_ANDROID)
result -> kernel_id = gettid();
# endif
result -> next = MK_GC_threads[hv];
......@@ -679,7 +679,7 @@ STATIC void MK_GC_remove_all_threads_but_me(void)
/* MK_GC_destroy_thread_local and MK_GC_free_internal */
/* before update). */
me -> stop_info.mach_thread = mach_thread_self();
# elif defined(PLATFORM_ANDROID)
# elif 0 /* JCB */ && defined(PLATFORM_ANDROID)
me -> kernel_id = gettid();
# endif
# if defined(THREAD_LOCAL_ALLOC) && !defined(USE_CUSTOM_SPECIFIC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment