1 /* Copyright (C) 2014 Free Software Foundation, Inc. 2 3 The GNU C Library is free software; you can redistribute it and/or 4 modify it under the terms of the GNU Lesser General Public 5 License as published by the Free Software Foundation; either 6 version 2.1 of the License, or (at your option) any later version. 7 8 The GNU C Library is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 Lesser General Public License for more details. 12 13 You should have received a copy of the GNU Lesser General Public 14 License along with the GNU C Library. If not, see 15 <http://www.gnu.org/licenses/>. */ 16 17 #include <sysdep.h> 18 #include <tls.h> 19 #ifndef __ASSEMBLER__ 20 # include <pthreadP.h> 21 #endif 22 23 #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt 24 25 # define SINGLE_THREAD_P \ 26 __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ 27 header.multiple_threads) == 0, 1) 28 29 #else 30 31 # define SINGLE_THREAD_P 1 32 # define NO_CANCELLATION 1 33 34 #endif 35 36 #define RTLD_SINGLE_THREAD_P \ 37 __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ 38 header.multiple_threads) == 0, 1) 39