1 /* This file is automatically generated. DO NOT EDIT! */
2 /* Generated from: NetBSD: mknative-gcc,v 1.66 2012/01/10 12:27:54 skrll Exp */
3 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */
5 /* Threads compatibility routines for libgcc2 and libobjc. */
6 /* Compile this one with gcc. */
7 /* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
8 2008, 2009, 2011 Free Software Foundation, Inc.
10 This file is part of GCC.
12 GCC is free software; you can redistribute it and/or modify it under
13 the terms of the GNU General Public License as published by the Free
14 Software Foundation; either version 3, or (at your option) any later
17 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
18 WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 Under Section 7 of GPL version 3, you are granted additional
23 permissions described in the GCC Runtime Library Exception, version
24 3.1, as published by the Free Software Foundation.
26 You should have received a copy of the GNU General Public License and
27 a copy of the GCC Runtime Library Exception along with this program;
28 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
29 <http://www.gnu.org/licenses/>. */
31 #ifndef _GLIBCXX_GCC_GTHR_POSIX_H
32 #define _GLIBCXX_GCC_GTHR_POSIX_H
34 /* POSIX threads specific definitions.
35 Easy, since the interface is just one-to-one mapping. */
38 #define __GTHREADS_CXX0X 1
40 /* Some implementations of <pthread.h> require this to be defined. */
41 #if !defined(_REENTRANT) && defined(__osf__)
48 typedef pthread_t __gthread_t
;
49 typedef pthread_key_t __gthread_key_t
;
50 typedef pthread_once_t __gthread_once_t
;
51 typedef pthread_mutex_t __gthread_mutex_t
;
52 typedef pthread_mutex_t __gthread_recursive_mutex_t
;
53 typedef pthread_cond_t __gthread_cond_t
;
54 typedef struct timespec __gthread_time_t
;
56 /* POSIX like conditional variables are supported. Please look at comments
57 in gthr.h for details. */
58 #define __GTHREAD_HAS_COND 1
60 #define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
61 #define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
62 #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
63 #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
64 #elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
65 #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
67 #define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
69 #define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
70 #define __GTHREAD_TIME_INIT {0,0}
72 #if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
73 # ifndef __gthrw_pragma
74 # define __gthrw_pragma(pragma)
76 # define __gthrw2(name,name2,type) \
77 static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
78 __gthrw_pragma(weak type)
79 # define __gthrw_(name) __gthrw_ ## name
81 # define __gthrw2(name,name2,type)
82 # define __gthrw_(name) name
85 /* Typically, __gthrw_foo is a weak reference to symbol foo. */
86 #define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
88 /* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
89 map a subset of the POSIX pthread API to mangled versions of their
91 #if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
92 #define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
93 __gthrw3(pthread_once
)
94 __gthrw3(pthread_getspecific
)
95 __gthrw3(pthread_setspecific
)
97 __gthrw3(pthread_create
)
98 __gthrw3(pthread_join
)
99 __gthrw3(pthread_detach
)
100 __gthrw3(pthread_equal
)
101 __gthrw3(pthread_self
)
102 __gthrw3(pthread_cancel
)
103 __gthrw3(sched_yield
)
105 __gthrw3(pthread_mutex_lock
)
106 __gthrw3(pthread_mutex_trylock
)
107 #ifdef _POSIX_TIMEOUTS
108 #if _POSIX_TIMEOUTS >= 0
109 __gthrw3(pthread_mutex_timedlock
)
111 #endif /* _POSIX_TIMEOUTS */
112 __gthrw3(pthread_mutex_unlock
)
113 __gthrw3(pthread_mutex_init
)
114 __gthrw3(pthread_mutex_destroy
)
116 __gthrw3(pthread_cond_broadcast
)
117 __gthrw3(pthread_cond_signal
)
118 __gthrw3(pthread_cond_wait
)
119 __gthrw3(pthread_cond_timedwait
)
120 __gthrw3(pthread_cond_destroy
)
122 __gthrw(pthread_once
)
123 __gthrw(pthread_getspecific
)
124 __gthrw(pthread_setspecific
)
126 __gthrw(pthread_create
)
127 __gthrw(pthread_join
)
128 __gthrw(pthread_equal
)
129 __gthrw(pthread_self
)
130 __gthrw(pthread_detach
)
131 __gthrw(pthread_cancel
)
134 __gthrw(pthread_mutex_lock
)
135 __gthrw(pthread_mutex_trylock
)
136 #ifdef _POSIX_TIMEOUTS
137 #if _POSIX_TIMEOUTS >= 0
138 __gthrw(pthread_mutex_timedlock
)
140 #endif /* _POSIX_TIMEOUTS */
141 __gthrw(pthread_mutex_unlock
)
142 __gthrw(pthread_mutex_init
)
143 __gthrw(pthread_mutex_destroy
)
145 __gthrw(pthread_cond_broadcast
)
146 __gthrw(pthread_cond_signal
)
147 __gthrw(pthread_cond_wait
)
148 __gthrw(pthread_cond_timedwait
)
149 __gthrw(pthread_cond_destroy
)
152 __gthrw(pthread_key_create
)
153 __gthrw(pthread_key_delete
)
154 __gthrw(pthread_mutexattr_init
)
155 __gthrw(pthread_mutexattr_settype
)
156 __gthrw(pthread_mutexattr_destroy
)
159 #if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
161 #if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
162 __gthrw3(pthread_cond_init
)
163 __gthrw3(pthread_exit
)
165 __gthrw(pthread_cond_init
)
166 __gthrw(pthread_exit
)
167 #endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
168 #ifdef _POSIX_PRIORITY_SCHEDULING
169 #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
170 __gthrw(sched_get_priority_max
)
171 __gthrw(sched_get_priority_min
)
172 #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
173 #endif /* _POSIX_PRIORITY_SCHEDULING */
174 __gthrw(pthread_attr_destroy
)
175 __gthrw(pthread_attr_init
)
176 __gthrw(pthread_attr_setdetachstate
)
177 #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
178 __gthrw(pthread_getschedparam
)
179 __gthrw(pthread_setschedparam
)
180 #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
181 #endif /* _LIBOBJC || _LIBOBJC_WEAK */
183 #if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
185 /* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
186 -pthreads is not specified. The functions are dummies and most return an
187 error value. However pthread_once returns 0 without invoking the routine
188 it is passed so we cannot pretend that the interface is active if -pthreads
189 is not specified. On Solaris 2.5.1, the interface is not exposed at all so
190 we need to play the usual game with weak symbols. On Solaris 10 and up, a
191 working interface is always exposed. On FreeBSD 6 and later, libc also
192 exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
193 to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
194 which means the alternate __gthread_active_p below cannot be used there. */
196 #if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
198 static volatile int __gthread_active
= -1;
201 __gthread_trigger (void)
203 __gthread_active
= 1;
207 __gthread_active_p (void)
209 static pthread_mutex_t __gthread_active_mutex
= PTHREAD_MUTEX_INITIALIZER
;
210 static pthread_once_t __gthread_active_once
= PTHREAD_ONCE_INIT
;
212 /* Avoid reading __gthread_active twice on the main code path. */
213 int __gthread_active_latest_value
= __gthread_active
;
215 /* This test is not protected to avoid taking a lock on the main code
216 path so every update of __gthread_active in a threaded program must
217 be atomic with regard to the result of the test. */
218 if (__builtin_expect (__gthread_active_latest_value
< 0, 0))
220 if (__gthrw_(pthread_once
))
222 /* If this really is a threaded program, then we must ensure that
223 __gthread_active has been set to 1 before exiting this block. */
224 __gthrw_(pthread_mutex_lock
) (&__gthread_active_mutex
);
225 __gthrw_(pthread_once
) (&__gthread_active_once
, __gthread_trigger
);
226 __gthrw_(pthread_mutex_unlock
) (&__gthread_active_mutex
);
229 /* Make sure we'll never enter this block again. */
230 if (__gthread_active
< 0)
231 __gthread_active
= 0;
233 __gthread_active_latest_value
= __gthread_active
;
236 return __gthread_active_latest_value
!= 0;
239 #else /* neither FreeBSD nor Solaris */
242 __gthread_active_p (void)
244 static void *const __gthread_active_ptr
245 = __extension__ (void *) &__gthrw_(pthread_cancel
);
246 return __gthread_active_ptr
!= 0;
249 #endif /* FreeBSD or Solaris */
251 #else /* not __GXX_WEAK__ */
253 /* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
254 calls in shared flavors of the HP-UX C library. Most of the stubs
255 have no functionality. The details are described in the "libc cumulative
256 patch" for each subversion of HP-UX 11. There are two special interfaces
257 provided for checking whether an application is linked to a shared pthread
258 library or not. However, these interfaces aren't available in early
259 libpthread libraries. We also need a test that works for archive
260 libraries. We can't use pthread_once as some libc versions call the
261 init function. We also can't use pthread_create or pthread_attr_init
262 as these create a thread and thereby prevent changing the default stack
263 size. The function pthread_default_stacksize_np is available in both
264 the archive and shared versions of libpthread. It can be used to
265 determine the default pthread stack size. There is a stub in some
266 shared libc versions which returns a zero size if pthreads are not
267 active. We provide an equivalent stub to handle cases where libc
268 doesn't provide one. */
270 #if defined(__hppa__) && defined(__hpux__)
272 static volatile int __gthread_active
= -1;
275 __gthread_active_p (void)
277 /* Avoid reading __gthread_active twice on the main code path. */
278 int __gthread_active_latest_value
= __gthread_active
;
281 if (__builtin_expect (__gthread_active_latest_value
< 0, 0))
283 pthread_default_stacksize_np (0, &__s
);
284 __gthread_active
= __s
? 1 : 0;
285 __gthread_active_latest_value
= __gthread_active
;
288 return __gthread_active_latest_value
!= 0;
291 #else /* not hppa-hpux */
294 __gthread_active_p (void)
299 #endif /* hppa-hpux */
301 #endif /* __GXX_WEAK__ */
305 /* This is the config.h file in libobjc/ */
312 /* Key structure for maintaining thread specific storage */
313 static pthread_key_t _objc_thread_storage
;
314 static pthread_attr_t _objc_thread_attribs
;
316 /* Thread local storage for a single thread */
317 static void *thread_local_storage
= NULL
;
319 /* Backend initialization functions */
321 /* Initialize the threads subsystem. */
323 __gthread_objc_init_thread_system (void)
325 if (__gthread_active_p ())
327 /* Initialize the thread storage key. */
328 if (__gthrw_(pthread_key_create
) (&_objc_thread_storage
, NULL
) == 0)
330 /* The normal default detach state for threads is
331 * PTHREAD_CREATE_JOINABLE which causes threads to not die
332 * when you think they should. */
333 if (__gthrw_(pthread_attr_init
) (&_objc_thread_attribs
) == 0
334 && __gthrw_(pthread_attr_setdetachstate
) (&_objc_thread_attribs
,
335 PTHREAD_CREATE_DETACHED
) == 0)
343 /* Close the threads subsystem. */
345 __gthread_objc_close_thread_system (void)
347 if (__gthread_active_p ()
348 && __gthrw_(pthread_key_delete
) (_objc_thread_storage
) == 0
349 && __gthrw_(pthread_attr_destroy
) (&_objc_thread_attribs
) == 0)
355 /* Backend thread functions */
357 /* Create a new thread of execution. */
358 static inline objc_thread_t
359 __gthread_objc_thread_detach (void (*func
)(void *), void *arg
)
361 objc_thread_t thread_id
;
362 pthread_t new_thread_handle
;
364 if (!__gthread_active_p ())
367 if (!(__gthrw_(pthread_create
) (&new_thread_handle
, NULL
, (void *) func
, arg
)))
368 thread_id
= (objc_thread_t
) new_thread_handle
;
375 /* Set the current thread's priority. */
377 __gthread_objc_thread_set_priority (int priority
)
379 if (!__gthread_active_p ())
383 #ifdef _POSIX_PRIORITY_SCHEDULING
384 #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
385 pthread_t thread_id
= __gthrw_(pthread_self
) ();
387 struct sched_param params
;
388 int priority_min
, priority_max
;
390 if (__gthrw_(pthread_getschedparam
) (thread_id
, &policy
, ¶ms
) == 0)
392 if ((priority_max
= __gthrw_(sched_get_priority_max
) (policy
)) == -1)
395 if ((priority_min
= __gthrw_(sched_get_priority_min
) (policy
)) == -1)
398 if (priority
> priority_max
)
399 priority
= priority_max
;
400 else if (priority
< priority_min
)
401 priority
= priority_min
;
402 params
.sched_priority
= priority
;
405 * The solaris 7 and several other man pages incorrectly state that
406 * this should be a pointer to policy but pthread.h is universally
409 if (__gthrw_(pthread_setschedparam
) (thread_id
, policy
, ¶ms
) == 0)
412 #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
413 #endif /* _POSIX_PRIORITY_SCHEDULING */
418 /* Return the current thread's priority. */
420 __gthread_objc_thread_get_priority (void)
422 #ifdef _POSIX_PRIORITY_SCHEDULING
423 #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
424 if (__gthread_active_p ())
427 struct sched_param params
;
429 if (__gthrw_(pthread_getschedparam
) (__gthrw_(pthread_self
) (), &policy
, ¶ms
) == 0)
430 return params
.sched_priority
;
435 #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
436 #endif /* _POSIX_PRIORITY_SCHEDULING */
437 return OBJC_THREAD_INTERACTIVE_PRIORITY
;
440 /* Yield our process time to another thread. */
442 __gthread_objc_thread_yield (void)
444 if (__gthread_active_p ())
445 __gthrw_(sched_yield
) ();
448 /* Terminate the current thread. */
450 __gthread_objc_thread_exit (void)
452 if (__gthread_active_p ())
453 /* exit the thread */
454 __gthrw_(pthread_exit
) (&__objc_thread_exit_status
);
456 /* Failed if we reached here */
460 /* Returns an integer value which uniquely describes a thread. */
461 static inline objc_thread_t
462 __gthread_objc_thread_id (void)
464 if (__gthread_active_p ())
465 return (objc_thread_t
) __gthrw_(pthread_self
) ();
467 return (objc_thread_t
) 1;
470 /* Sets the thread's local storage pointer. */
472 __gthread_objc_thread_set_data (void *value
)
474 if (__gthread_active_p ())
475 return __gthrw_(pthread_setspecific
) (_objc_thread_storage
, value
);
478 thread_local_storage
= value
;
483 /* Returns the thread's local storage pointer. */
485 __gthread_objc_thread_get_data (void)
487 if (__gthread_active_p ())
488 return __gthrw_(pthread_getspecific
) (_objc_thread_storage
);
490 return thread_local_storage
;
493 /* Backend mutex functions */
495 /* Allocate a mutex. */
497 __gthread_objc_mutex_allocate (objc_mutex_t mutex
)
499 if (__gthread_active_p ())
501 mutex
->backend
= objc_malloc (sizeof (pthread_mutex_t
));
503 if (__gthrw_(pthread_mutex_init
) ((pthread_mutex_t
*) mutex
->backend
, NULL
))
505 objc_free (mutex
->backend
);
506 mutex
->backend
= NULL
;
514 /* Deallocate a mutex. */
516 __gthread_objc_mutex_deallocate (objc_mutex_t mutex
)
518 if (__gthread_active_p ())
523 * Posix Threads specifically require that the thread be unlocked
524 * for __gthrw_(pthread_mutex_destroy) to work.
529 count
= __gthrw_(pthread_mutex_unlock
) ((pthread_mutex_t
*) mutex
->backend
);
535 if (__gthrw_(pthread_mutex_destroy
) ((pthread_mutex_t
*) mutex
->backend
))
538 objc_free (mutex
->backend
);
539 mutex
->backend
= NULL
;
544 /* Grab a lock on a mutex. */
546 __gthread_objc_mutex_lock (objc_mutex_t mutex
)
548 if (__gthread_active_p ()
549 && __gthrw_(pthread_mutex_lock
) ((pthread_mutex_t
*) mutex
->backend
) != 0)
557 /* Try to grab a lock on a mutex. */
559 __gthread_objc_mutex_trylock (objc_mutex_t mutex
)
561 if (__gthread_active_p ()
562 && __gthrw_(pthread_mutex_trylock
) ((pthread_mutex_t
*) mutex
->backend
) != 0)
570 /* Unlock the mutex */
572 __gthread_objc_mutex_unlock (objc_mutex_t mutex
)
574 if (__gthread_active_p ()
575 && __gthrw_(pthread_mutex_unlock
) ((pthread_mutex_t
*) mutex
->backend
) != 0)
583 /* Backend condition mutex functions */
585 /* Allocate a condition. */
587 __gthread_objc_condition_allocate (objc_condition_t condition
)
589 if (__gthread_active_p ())
591 condition
->backend
= objc_malloc (sizeof (pthread_cond_t
));
593 if (__gthrw_(pthread_cond_init
) ((pthread_cond_t
*) condition
->backend
, NULL
))
595 objc_free (condition
->backend
);
596 condition
->backend
= NULL
;
604 /* Deallocate a condition. */
606 __gthread_objc_condition_deallocate (objc_condition_t condition
)
608 if (__gthread_active_p ())
610 if (__gthrw_(pthread_cond_destroy
) ((pthread_cond_t
*) condition
->backend
))
613 objc_free (condition
->backend
);
614 condition
->backend
= NULL
;
619 /* Wait on the condition */
621 __gthread_objc_condition_wait (objc_condition_t condition
, objc_mutex_t mutex
)
623 if (__gthread_active_p ())
624 return __gthrw_(pthread_cond_wait
) ((pthread_cond_t
*) condition
->backend
,
625 (pthread_mutex_t
*) mutex
->backend
);
630 /* Wake up all threads waiting on this condition. */
632 __gthread_objc_condition_broadcast (objc_condition_t condition
)
634 if (__gthread_active_p ())
635 return __gthrw_(pthread_cond_broadcast
) ((pthread_cond_t
*) condition
->backend
);
640 /* Wake up one thread waiting on this condition. */
642 __gthread_objc_condition_signal (objc_condition_t condition
)
644 if (__gthread_active_p ())
645 return __gthrw_(pthread_cond_signal
) ((pthread_cond_t
*) condition
->backend
);
653 __gthread_create (__gthread_t
*__threadid
, void *(*__func
) (void*),
656 return __gthrw_(pthread_create
) (__threadid
, NULL
, __func
, __args
);
660 __gthread_join (__gthread_t __threadid
, void **__value_ptr
)
662 return __gthrw_(pthread_join
) (__threadid
, __value_ptr
);
666 __gthread_detach (__gthread_t __threadid
)
668 return __gthrw_(pthread_detach
) (__threadid
);
672 __gthread_equal (__gthread_t __t1
, __gthread_t __t2
)
674 return __gthrw_(pthread_equal
) (__t1
, __t2
);
677 static inline __gthread_t
678 __gthread_self (void)
680 return __gthrw_(pthread_self
) ();
684 __gthread_yield (void)
686 return __gthrw_(sched_yield
) ();
690 __gthread_once (__gthread_once_t
*__once
, void (*__func
) (void))
692 if (__gthread_active_p ())
693 return __gthrw_(pthread_once
) (__once
, __func
);
699 __gthread_key_create (__gthread_key_t
*__key
, void (*__dtor
) (void *))
701 return __gthrw_(pthread_key_create
) (__key
, __dtor
);
705 __gthread_key_delete (__gthread_key_t __key
)
707 return __gthrw_(pthread_key_delete
) (__key
);
711 __gthread_getspecific (__gthread_key_t __key
)
713 return __gthrw_(pthread_getspecific
) (__key
);
717 __gthread_setspecific (__gthread_key_t __key
, const void *__ptr
)
719 return __gthrw_(pthread_setspecific
) (__key
, __ptr
);
723 __gthread_mutex_destroy (__gthread_mutex_t
*__mutex
)
725 if (__gthread_active_p ())
726 return __gthrw_(pthread_mutex_destroy
) (__mutex
);
732 __gthread_mutex_lock (__gthread_mutex_t
*__mutex
)
734 if (__gthread_active_p ())
735 return __gthrw_(pthread_mutex_lock
) (__mutex
);
741 __gthread_mutex_trylock (__gthread_mutex_t
*__mutex
)
743 if (__gthread_active_p ())
744 return __gthrw_(pthread_mutex_trylock
) (__mutex
);
749 #ifdef _POSIX_TIMEOUTS
750 #if _POSIX_TIMEOUTS >= 0
752 __gthread_mutex_timedlock (__gthread_mutex_t
*__mutex
,
753 const __gthread_time_t
*__abs_timeout
)
755 if (__gthread_active_p ())
756 return __gthrw_(pthread_mutex_timedlock
) (__mutex
, __abs_timeout
);
764 __gthread_mutex_unlock (__gthread_mutex_t
*__mutex
)
766 if (__gthread_active_p ())
767 return __gthrw_(pthread_mutex_unlock
) (__mutex
);
772 #ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
774 __gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t
*__mutex
)
776 if (__gthread_active_p ())
778 pthread_mutexattr_t __attr
;
781 __r
= __gthrw_(pthread_mutexattr_init
) (&__attr
);
783 __r
= __gthrw_(pthread_mutexattr_settype
) (&__attr
,
784 PTHREAD_MUTEX_RECURSIVE
);
786 __r
= __gthrw_(pthread_mutex_init
) (__mutex
, &__attr
);
788 __r
= __gthrw_(pthread_mutexattr_destroy
) (&__attr
);
796 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t
*__mutex
)
798 return __gthread_mutex_lock (__mutex
);
802 __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t
*__mutex
)
804 return __gthread_mutex_trylock (__mutex
);
807 #ifdef _POSIX_TIMEOUTS
808 #if _POSIX_TIMEOUTS >= 0
810 __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t
*__mutex
,
811 const __gthread_time_t
*__abs_timeout
)
813 return __gthread_mutex_timedlock (__mutex
, __abs_timeout
);
819 __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t
*__mutex
)
821 return __gthread_mutex_unlock (__mutex
);
825 __gthread_cond_broadcast (__gthread_cond_t
*__cond
)
827 return __gthrw_(pthread_cond_broadcast
) (__cond
);
831 __gthread_cond_signal (__gthread_cond_t
*__cond
)
833 return __gthrw_(pthread_cond_signal
) (__cond
);
837 __gthread_cond_wait (__gthread_cond_t
*__cond
, __gthread_mutex_t
*__mutex
)
839 return __gthrw_(pthread_cond_wait
) (__cond
, __mutex
);
843 __gthread_cond_timedwait (__gthread_cond_t
*__cond
, __gthread_mutex_t
*__mutex
,
844 const __gthread_time_t
*__abs_timeout
)
846 return __gthrw_(pthread_cond_timedwait
) (__cond
, __mutex
, __abs_timeout
);
850 __gthread_cond_wait_recursive (__gthread_cond_t
*__cond
,
851 __gthread_recursive_mutex_t
*__mutex
)
853 return __gthread_cond_wait (__cond
, __mutex
);
857 __gthread_cond_timedwait_recursive (__gthread_cond_t
*__cond
,
858 __gthread_recursive_mutex_t
*__mutex
,
859 const __gthread_time_t
*__abs_timeout
)
861 return __gthread_cond_timedwait (__cond
, __mutex
, __abs_timeout
);
865 __gthread_cond_destroy (__gthread_cond_t
* __cond
)
867 return __gthrw_(pthread_cond_destroy
) (__cond
);
870 #endif /* _LIBOBJC */
872 #endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */