(Cherry-pick commit
7de43fef from 'release-7_4' branch.)
* include/private/pthread_stop_world.h [!GC_OPENBSD_THREADS]
(thread_stop_info.last_stop_count): Change the
type from word to AO_t; add volatile qualifier; fix a typo in comment
("GC_stop_count").
* pthread_stop_world.c [!GC_OPENBSD_THREADS && !NACL]
(GC_suspend_handler_inner): Replace
me->stop_info.last_stop_count=my_stop_count with
AO_store_release(&me->stop_info.last_stop_count,my_stop_count).
struct thread_stop_info {
# ifndef GC_OPENBSD_THREADS
- word last_stop_count; /* GC_last_stop_count value when thread */
- /* last successfully handled a suspend */
- /* signal. */
+ volatile AO_t last_stop_count;
+ /* The value of GC_stop_count when the thread */
+ /* last successfully handled a suspend signal. */
# endif
ptr_t stack_ptr; /* Valid only when stopped. */
/* thread has been stopped. Note that sem_post() is */
/* the only async-signal-safe primitive in LinuxThreads. */
sem_post(&GC_suspend_ack_sem);
- me -> stop_info.last_stop_count = my_stop_count;
+ AO_store_release(&me->stop_info.last_stop_count, my_stop_count);
/* Wait until that thread tells us to restart by sending */
/* this thread a SIG_THR_RESTART signal. */