Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gcc - build the gthr*.h files to be installed on the f...



details:   https://anonhg.NetBSD.org/src/rev/cdfb474d072d
branches:  trunk
changeset: 996812:cdfb474d072d
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Feb 09 03:57:00 2019 +0000

description:
- build the gthr*.h files to be installed on the fly, instead of
  having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.

diffstat:

 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr-posix.h     |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr-single.h    |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr.h           |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gthr-posix.h       |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gthr-single.h      |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gthr-tpf.h         |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gthr.h             |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gthr-posix.h         |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gthr-single.h        |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gthr-tpf.h           |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gthr.h               |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gthr-posix.h       |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gthr-single.h      |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gthr-tpf.h         |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gthr.h             |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gthr-posix.h        |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gthr-single.h       |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gthr-tpf.h          |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gthr.h              |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gthr-posix.h  |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gthr-single.h |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gthr-tpf.h    |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gthr.h        |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gthr-posix.h  |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gthr-single.h |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gthr-tpf.h    |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gthr.h        |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gthr-posix.h        |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gthr-single.h       |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gthr-tpf.h          |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gthr.h              |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gthr-posix.h        |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gthr-single.h       |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gthr-tpf.h          |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gthr.h              |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/gthr-posix.h        |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/gthr-single.h       |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/gthr-tpf.h          |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/gthr.h              |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gthr-posix.h        |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gthr-single.h       |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gthr-tpf.h          |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gthr.h              |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gthr-posix.h    |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gthr-single.h   |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gthr-tpf.h      |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gthr.h          |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/gthr-posix.h        |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/gthr-single.h       |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/gthr-tpf.h          |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/gthr.h              |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gthr-posix.h     |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gthr-single.h    |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gthr-tpf.h       |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gthr.h           |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-posix.h   |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-single.h  |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-tpf.h     |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr.h         |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/riscv32/gthr-posix.h     |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/riscv32/gthr-single.h    |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/riscv32/gthr.h           |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/riscv64/gthr-posix.h     |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/riscv64/gthr-single.h    |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/riscv64/gthr.h           |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gthr-posix.h       |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gthr-single.h      |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gthr-tpf.h         |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gthr.h             |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gthr-posix.h       |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gthr-single.h      |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gthr-tpf.h         |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gthr.h             |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gthr-posix.h       |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gthr-single.h      |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gthr-tpf.h         |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gthr.h             |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gthr-posix.h     |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gthr-single.h    |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gthr-tpf.h       |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gthr.h           |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gthr-posix.h         |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gthr-single.h        |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gthr-tpf.h           |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gthr.h               |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gthr-posix.h      |  893 ----------
 external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gthr-single.h     |  302 ---
 external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gthr-tpf.h        |  233 --
 external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gthr.h            |  158 -
 external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile         |   34 +-
 tools/gcc/mknative-gcc                                           |    4 +-
 155 files changed, 34 insertions(+), 61159 deletions(-)

diffs (truncated from 61845 to 300 lines):

diff -r 59915a2378a2 -r cdfb474d072d external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr-posix.h
--- a/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr-posix.h      Sat Feb 09 03:35:55 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,893 +0,0 @@
-/* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
-
-/* Threads compatibility routines for libgcc2 and libobjc.  */
-/* Compile this one with gcc.  */
-/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
-#define _GLIBCXX_GCC_GTHR_POSIX_H
-
-/* POSIX threads specific definitions.
-   Easy, since the interface is just one-to-one mapping.  */
-
-#define __GTHREADS 1
-#define __GTHREADS_CXX0X 1
-
-#include <pthread.h>
-
-#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
-     || !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK))
-# include <unistd.h>
-# if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 0
-#  define _GTHREAD_USE_MUTEX_TIMEDLOCK 1
-# else
-#  define _GTHREAD_USE_MUTEX_TIMEDLOCK 0
-# endif
-#endif
-
-typedef pthread_t __gthread_t;
-typedef pthread_key_t __gthread_key_t;
-typedef pthread_once_t __gthread_once_t;
-typedef pthread_mutex_t __gthread_mutex_t;
-typedef pthread_mutex_t __gthread_recursive_mutex_t;
-typedef pthread_cond_t __gthread_cond_t;
-typedef struct timespec __gthread_time_t;
-
-/* POSIX like conditional variables are supported.  Please look at comments
-   in gthr.h for details. */
-#define __GTHREAD_HAS_COND     1
-
-#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
-#define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
-#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
-#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
-#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
-#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
-#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
-#else
-#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
-#endif
-#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
-#define __GTHREAD_TIME_INIT {0,0}
-
-#ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
-# undef __GTHREAD_MUTEX_INIT
-#endif
-#ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
-# undef __GTHREAD_RECURSIVE_MUTEX_INIT
-# undef __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
-# define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
-#endif
-#ifdef _GTHREAD_USE_COND_INIT_FUNC
-# undef __GTHREAD_COND_INIT
-# define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function
-#endif
-
-#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
-# ifndef __gthrw_pragma
-#  define __gthrw_pragma(pragma)
-# endif
-# define __gthrw2(name,name2,type) \
-  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
-  __gthrw_pragma(weak type)
-# define __gthrw_(name) __gthrw_ ## name
-#else
-# define __gthrw2(name,name2,type)
-# define __gthrw_(name) name
-#endif
-
-/* Typically, __gthrw_foo is a weak reference to symbol foo.  */
-#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
-
-__gthrw(pthread_once)
-__gthrw(pthread_getspecific)
-__gthrw(pthread_setspecific)
-
-__gthrw(pthread_create)
-__gthrw(pthread_join)
-__gthrw(pthread_equal)
-__gthrw(pthread_self)
-__gthrw(pthread_detach)
-#ifndef __BIONIC__
-__gthrw(pthread_cancel)
-#endif
-__gthrw(sched_yield)
-
-__gthrw(pthread_mutex_lock)
-__gthrw(pthread_mutex_trylock)
-#if _GTHREAD_USE_MUTEX_TIMEDLOCK
-__gthrw(pthread_mutex_timedlock)
-#endif
-__gthrw(pthread_mutex_unlock)
-__gthrw(pthread_mutex_init)
-__gthrw(pthread_mutex_destroy)
-
-__gthrw(pthread_cond_init)
-__gthrw(pthread_cond_broadcast)
-__gthrw(pthread_cond_signal)
-__gthrw(pthread_cond_wait)
-__gthrw(pthread_cond_timedwait)
-__gthrw(pthread_cond_destroy)
-
-__gthrw(pthread_key_create)
-__gthrw(pthread_key_delete)
-__gthrw(pthread_mutexattr_init)
-__gthrw(pthread_mutexattr_settype)
-__gthrw(pthread_mutexattr_destroy)
-
-
-#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
-/* Objective-C.  */
-__gthrw(pthread_exit)
-#ifdef _POSIX_PRIORITY_SCHEDULING
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
-__gthrw(sched_get_priority_max)
-__gthrw(sched_get_priority_min)
-#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
-#endif /* _POSIX_PRIORITY_SCHEDULING */
-__gthrw(pthread_attr_destroy)
-__gthrw(pthread_attr_init)
-__gthrw(pthread_attr_setdetachstate)
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
-__gthrw(pthread_getschedparam)
-__gthrw(pthread_setschedparam)
-#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
-#endif /* _LIBOBJC || _LIBOBJC_WEAK */
-
-#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
-
-/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
-   -pthreads is not specified.  The functions are dummies and most return an
-   error value.  However pthread_once returns 0 without invoking the routine
-   it is passed so we cannot pretend that the interface is active if -pthreads
-   is not specified.  On Solaris 2.5.1, the interface is not exposed at all so
-   we need to play the usual game with weak symbols.  On Solaris 10 and up, a
-   working interface is always exposed.  On FreeBSD 6 and later, libc also
-   exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
-   to 9 does.  FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
-   which means the alternate __gthread_active_p below cannot be used there.  */
-
-#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
-
-static volatile int __gthread_active = -1;
-
-static void
-__gthread_trigger (void)
-{
-  __gthread_active = 1;
-}
-
-static inline int
-__gthread_active_p (void)
-{
-  static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
-  static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
-
-  /* Avoid reading __gthread_active twice on the main code path.  */
-  int __gthread_active_latest_value = __gthread_active;
-
-  /* This test is not protected to avoid taking a lock on the main code
-     path so every update of __gthread_active in a threaded program must
-     be atomic with regard to the result of the test.  */
-  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
-    {
-      if (__gthrw_(pthread_once))
-       {
-         /* If this really is a threaded program, then we must ensure that
-            __gthread_active has been set to 1 before exiting this block.  */
-         __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
-         __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
-         __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
-       }
-
-      /* Make sure we'll never enter this block again.  */
-      if (__gthread_active < 0)
-       __gthread_active = 0;
-
-      __gthread_active_latest_value = __gthread_active;
-    }
-
-  return __gthread_active_latest_value != 0;
-}
-
-#else /* neither FreeBSD nor Solaris */
-
-/* For a program to be multi-threaded the only thing that it certainly must
-   be using is pthread_create.  However, there may be other libraries that
-   intercept pthread_create with their own definitions to wrap pthreads
-   functionality for some purpose.  In those cases, pthread_create being
-   defined might not necessarily mean that libpthread is actually linked
-   in.
-
-   For the GNU C library, we can use a known internal name.  This is always
-   available in the ABI, but no other library would define it.  That is
-   ideal, since any public pthread function might be intercepted just as
-   pthread_create might be.  __pthread_key_create is an "internal"
-   implementation symbol, but it is part of the public exported ABI.  Also,
-   it's among the symbols that the static libpthread.a always links in
-   whenever pthread_create is used, so there is no danger of a false
-   negative result in any statically-linked, multi-threaded program.
-
-   For others, we choose pthread_cancel as a function that seems unlikely
-   to be redefined by an interceptor library.  The bionic (Android) C
-   library does not provide pthread_cancel, so we do use pthread_create
-   there (and interceptor libraries lose).  */
-
-#ifdef __GLIBC__
-__gthrw2(__gthrw_(__pthread_key_create),
-        __pthread_key_create,
-        pthread_key_create)
-# define GTHR_ACTIVE_PROXY     __gthrw_(__pthread_key_create)
-#elif defined (__BIONIC__)
-# define GTHR_ACTIVE_PROXY     __gthrw_(pthread_create)
-#else
-# define GTHR_ACTIVE_PROXY     __gthrw_(pthread_cancel)
-#endif
-
-static inline int
-__gthread_active_p (void)
-{
-  static void *const __gthread_active_ptr
-    = __extension__ (void *) &GTHR_ACTIVE_PROXY;
-  return __gthread_active_ptr != 0;
-}
-
-#endif /* FreeBSD or Solaris */
-
-#else /* not __GXX_WEAK__ */
-
-/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
-   calls in shared flavors of the HP-UX C library.  Most of the stubs
-   have no functionality.  The details are described in the "libc cumulative
-   patch" for each subversion of HP-UX 11.  There are two special interfaces
-   provided for checking whether an application is linked to a shared pthread
-   library or not.  However, these interfaces aren't available in early
-   libpthread libraries.  We also need a test that works for archive
-   libraries.  We can't use pthread_once as some libc versions call the
-   init function.  We also can't use pthread_create or pthread_attr_init
-   as these create a thread and thereby prevent changing the default stack
-   size.  The function pthread_default_stacksize_np is available in both
-   the archive and shared versions of libpthread.   It can be used to
-   determine the default pthread stack size.  There is a stub in some
-   shared libc versions which returns a zero size if pthreads are not
-   active.  We provide an equivalent stub to handle cases where libc
-   doesn't provide one.  */
-
-#if defined(__hppa__) && defined(__hpux__)
-
-static volatile int __gthread_active = -1;
-
-static inline int
-__gthread_active_p (void)
-{
-  /* Avoid reading __gthread_active twice on the main code path.  */
-  int __gthread_active_latest_value = __gthread_active;
-  size_t __s;
-
-  if (__builtin_expect (__gthread_active_latest_value < 0, 0))
-    {
-      pthread_default_stacksize_np (0, &__s);
-      __gthread_active = __s ? 1 : 0;
-      __gthread_active_latest_value = __gthread_active;
-    }
-



Home | Main Index | Thread Index | Old Index