diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-04-27 21:55:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-04-27 21:55:49 +0000 |
commit | d5c157a978000970befcfa067410896fe08a3dcc (patch) | |
tree | 68b2f08ad5abd548bd2103047a431cca164937d3 /nptl/libc-cancellation.c | |
parent | 6284c9f61e25a6f259d25b21b5c0ca223a3e8012 (diff) | |
download | glibc-d5c157a978000970befcfa067410896fe08a3dcc.tar.gz glibc-d5c157a978000970befcfa067410896fe08a3dcc.tar.xz glibc-d5c157a978000970befcfa067410896fe08a3dcc.zip |
* cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
is available. * libc-cancellation.c (__libc_disable_asynccancel): Likewise. * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND. * sysdeps/i386/tls.h: Likewise. (tcbhead_t): Add __private_tm member.
Diffstat (limited to 'nptl/libc-cancellation.c')
-rw-r--r-- | nptl/libc-cancellation.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c index b88a32fefd..cf24f1c0f2 100644 --- a/nptl/libc-cancellation.c +++ b/nptl/libc-cancellation.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -86,6 +86,10 @@ __libc_disable_asynccancel (int oldtype) return; struct pthread *self = THREAD_SELF; + +#ifdef THREAD_ATOMIC_AND + THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); +#else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) @@ -103,6 +107,7 @@ __libc_disable_asynccancel (int oldtype) /* Prepare the next round. */ oldval = curval; } +#endif } |