From: Rich Felker Date: Fri, 1 Apr 2011 23:53:16 +0000 (-0400) Subject: use a_store to set cancel flag in pthread_cancel, to ensure a barrier X-Git-Tag: v0.7.5~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ded6cb5f719464649bcb61624d52327ae444bfca;p=oweals%2Fmusl.git use a_store to set cancel flag in pthread_cancel, to ensure a barrier --- diff --git a/src/thread/pthread_cancel.c b/src/thread/pthread_cancel.c index 1ff00ad3..c497dbe6 100644 --- a/src/thread/pthread_cancel.c +++ b/src/thread/pthread_cancel.c @@ -2,6 +2,6 @@ int pthread_cancel(pthread_t t) { - t->cancel = 1; + a_store(&t->cancel, 1); return pthread_kill(t, SIGCANCEL); }