From 0db6025887ea1b9c8714e3908ae0510e99f447ac Mon Sep 17 00:00:00 2001 From: Elijah Taylor Date: Thu, 31 Jan 2013 12:48:49 -0800 Subject: [PATCH] NaCl GC improvements (fix volatile for vars accessed by syscall hooks) (Apply part of commit 204bcc6 from 'mono_libgc' branch.) Conflicts: * pthread_stop_world.c * pthread_support.c --- pthread_stop_world.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pthread_stop_world.c b/pthread_stop_world.c index a9f34165..0dfd3563 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -22,18 +22,18 @@ #ifdef NACL -#include -#include +# include +# include -STATIC int GC_nacl_num_gc_threads = 0; -STATIC __thread int GC_nacl_thread_idx = -1; -STATIC int GC_nacl_park_threads_now = 0; -STATIC pthread_t GC_nacl_thread_parker = -1; + STATIC int GC_nacl_num_gc_threads = 0; + STATIC __thread int GC_nacl_thread_idx = -1; + STATIC volatile int GC_nacl_park_threads_now = 0; + STATIC volatile pthread_t GC_nacl_thread_parker = -1; -GC_INNER __thread GC_thread GC_nacl_gc_thread_self = NULL; + GC_INNER __thread GC_thread GC_nacl_gc_thread_self = NULL; -int GC_nacl_thread_parked[MAX_NACL_GC_THREADS]; -int GC_nacl_thread_used[MAX_NACL_GC_THREADS]; + volatile int GC_nacl_thread_parked[MAX_NACL_GC_THREADS]; + int GC_nacl_thread_used[MAX_NACL_GC_THREADS]; #elif defined(GC_OPENBSD_UTHREADS) -- 2.40.0