summaryrefslogtreecommitdiff
path: root/src/thread/pthread_cancel.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-01 19:53:16 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-01 19:53:16 -0400
commitded6cb5f719464649bcb61624d52327ae444bfca (patch)
treef23be05f2bfcabd6f31978d76f3302034fe32f01 /src/thread/pthread_cancel.c
parentc1b39b203dc3614469f2581fa4d6146cf0ac2af0 (diff)
downloadmusl-ded6cb5f719464649bcb61624d52327ae444bfca.tar.gz
use a_store to set cancel flag in pthread_cancel, to ensure a barrier
Diffstat (limited to 'src/thread/pthread_cancel.c')
-rw-r--r--src/thread/pthread_cancel.c2
1 files changed, 1 insertions, 1 deletions
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);
}