Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git] / gnu / lib / libstdc++-v3_4 / arch / sparc64 / gthr.h
blob5786f887c77cc5604c1a13e93bbe7398c5cb6705
1 /* This file is automatically generated. DO NOT EDIT! */
2 /* Generated from: NetBSD: mknative-gcc,v 1.22 2006/06/25 03:06:15 mrg Exp */
3 /* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */
5 /* Threads compatibility routines for libgcc2. */
6 /* Compile this one with gcc. */
7 /* Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
9 This file is part of GCC.
11 GCC is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free
13 Software Foundation; either version 2, or (at your option) any later
14 version.
16 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
17 WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 for more details.
21 You should have received a copy of the GNU General Public License
22 along with GCC; see the file COPYING. If not, write to the Free
23 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
24 02110-1301, USA. */
26 /* As a special exception, if you link this library with other files,
27 some of which are compiled with GCC, to produce an executable,
28 this library does not by itself cause the resulting executable
29 to be covered by the GNU General Public License.
30 This exception does not however invalidate any other reasons why
31 the executable file might be covered by the GNU General Public License. */
33 #ifndef _GLIBCXX_GCC_GTHR_H
34 #define _GLIBCXX_GCC_GTHR_H
36 #ifndef _GLIBCXX_HIDE_EXPORTS
37 #pragma GCC visibility push(default)
38 #endif
40 /* If this file is compiled with threads support, it must
41 #define __GTHREADS 1
42 to indicate that threads support is present. Also it has define
43 function
44 int __gthread_active_p ()
45 that returns 1 if thread system is active, 0 if not.
47 The threads interface must define the following types:
48 __gthread_key_t
49 __gthread_once_t
50 __gthread_mutex_t
51 __gthread_recursive_mutex_t
53 The threads interface must define the following macros:
55 __GTHREAD_ONCE_INIT
56 to initialize __gthread_once_t
57 __GTHREAD_MUTEX_INIT
58 to initialize __gthread_mutex_t to get a fast
59 non-recursive mutex.
60 __GTHREAD_MUTEX_INIT_FUNCTION
61 some systems can't initialize a mutex without a
62 function call. On such systems, define this to a
63 function which looks like this:
64 void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
65 Don't define __GTHREAD_MUTEX_INIT in this case
66 __GTHREAD_RECURSIVE_MUTEX_INIT
67 __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
68 as above, but for a recursive mutex.
70 The threads interface must define the following static functions:
72 int __gthread_once (__gthread_once_t *once, void (*func) ())
74 int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
75 int __gthread_key_delete (__gthread_key_t key)
77 void *__gthread_getspecific (__gthread_key_t key)
78 int __gthread_setspecific (__gthread_key_t key, const void *ptr)
80 int __gthread_mutex_lock (__gthread_mutex_t *mutex);
81 int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
82 int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
84 int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
85 int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
86 int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
88 All functions returning int should return zero on success or the error
89 number. If the operation is not supported, -1 is returned.
91 Currently supported threads packages are
92 TPF threads with -D__tpf__
93 POSIX/Unix98 threads with -D_PTHREADS
94 POSIX/Unix95 threads with -D_PTHREADS95
95 DCE threads with -D_DCE_THREADS
96 Solaris/UI threads with -D_SOLARIS_THREADS
99 /* Check first for thread specific defines. */
100 #if defined (_GLIBCXX___tpf_GLIBCXX___)
101 #include <bits/gthr-tpf.h>
102 #elif _GLIBCXX__PTHREADS
103 #include <bits/gthr-posix.h>
104 #elif _GLIBCXX__PTHREADS95
105 #include <bits/gthr-posix95.h>
106 #elif _GLIBCXX__DCE_THREADS
107 #include <bits/gthr-dce.h>
108 #elif _GLIBCXX__SOLARIS_THREADS
109 #include <bits/gthr-solaris.h>
111 /* Include GTHREAD_FILE if one is defined. */
112 #elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
113 #if __GXX_WEAK__
114 #ifndef _GLIBCXX_GTHREAD_USE_WEAK
115 #define _GLIBCXX_GTHREAD_USE_WEAK 1
116 #endif
117 #endif
118 #include <bits/gthr-default.h>
120 /* Fallback to single thread definitions. */
121 #else
122 #include <bits/gthr-single.h>
123 #endif
125 #ifndef _GLIBCXX_HIDE_EXPORTS
126 #pragma GCC visibility pop
127 #endif
129 #endif /* ! _GLIBCXX_GCC_GTHR_H */