From ded6cb5f719464649bcb61624d52327ae444bfca Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 1 Apr 2011 19:53:16 -0400 Subject: [PATCH] use a_store to set cancel flag in pthread_cancel, to ensure a barrier --- src/thread/pthread_cancel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.25.1