From ba51ce5c65ff0b23eaa6c196e724922a1eb2151c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 29 Nov 2017 21:14:59 +0300 Subject: [PATCH] Improve comment in store_stack_ptr in pthread_stop_world.c (fix commit a194093) * pthread_stop_world.c (GC_store_stack_ptr): Refine comment about the atomic primitives usage. --- pthread_stop_world.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pthread_stop_world.c b/pthread_stop_world.c index b1f3745..c012f66 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -267,9 +267,9 @@ GC_INLINE void GC_store_stack_ptr(GC_thread me) /* stack_ptr) and GC_push_all_stacks (fetching stack_ptr) because */ /* GC_push_all_stacks is executed after GC_stop_world exits and the */ /* latter runs sem_[try]wait repeatedly waiting for all the suspended */ - /* threads to call sem_post. At the same time, stack_ptr is stored */ - /* (here) and fetched (by GC_push_all_stacks) atomically to avoid the */ - /* related TSan warning. */ + /* threads to call sem_post. Nonetheless, stack_ptr is stored (here) */ + /* and fetched (by GC_push_all_stacks) using the atomic primitives to */ + /* avoid the related TSan warning. */ # ifdef SPARC AO_store((volatile AO_t *)&me->stop_info.stack_ptr, (AO_t)GC_save_regs_in_stack()); -- 2.7.4