mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
* 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.
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user