1 /* Copyright (C) 2003-2017 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) \ 28 == 0, 1) 29 30 #else 31 32 # define SINGLE_THREAD_P 1 33 # define NO_CANCELLATION 1 34 35 #endif 36 37 #define RTLD_SINGLE_THREAD_P \ 38 __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ 39 header.multiple_threads) == 0, 1) 40