26 #ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
27 #define _GLIBCXX_GCC_GTHR_SINGLE_H
31 typedef int __gthread_key_t;
32 typedef int __gthread_once_t;
33 typedef int __gthread_mutex_t;
34 typedef int __gthread_recursive_mutex_t;
36 #define __GTHREAD_ONCE_INIT 0
37 #define __GTHREAD_MUTEX_INIT 0
38 #define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
39 #define __GTHREAD_RECURSIVE_MUTEX_INIT 0
41 #define _GLIBCXX_UNUSED __attribute__((unused))
46 static void *thread_local_storage = NULL;
52 __gthread_objc_init_thread_system (
void)
60 __gthread_objc_close_thread_system (
void)
69 static inline objc_thread_t
70 __gthread_objc_thread_detach (
void (* func)(
void *),
void * arg _GLIBCXX_UNUSED)
78 __gthread_objc_thread_set_priority (
int priority _GLIBCXX_UNUSED)
86 __gthread_objc_thread_get_priority (
void)
88 return OBJC_THREAD_INTERACTIVE_PRIORITY;
93 __gthread_objc_thread_yield (
void)
100 __gthread_objc_thread_exit (
void)
109 static inline objc_thread_t
110 __gthread_objc_thread_id (
void)
113 return (objc_thread_t) 1;
118 __gthread_objc_thread_set_data (
void *value)
120 thread_local_storage = value;
126 __gthread_objc_thread_get_data (
void)
128 return thread_local_storage;
135 __gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
142 __gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
149 __gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
157 __gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
165 __gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
174 __gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
181 __gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
188 __gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
189 objc_mutex_t mutex _GLIBCXX_UNUSED)
196 __gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
203 __gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
211 __gthread_active_p (
void)
217 __gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED,
void (*__func) (
void) _GLIBCXX_UNUSED)
222 static inline int _GLIBCXX_UNUSED
223 __gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED,
void (*__func) (
void *) _GLIBCXX_UNUSED)
228 static int _GLIBCXX_UNUSED
229 __gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
235 __gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
241 __gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED,
const void *__v _GLIBCXX_UNUSED)
247 __gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
253 __gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
259 __gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
265 __gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
271 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
273 return __gthread_mutex_lock (__mutex);
277 __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
279 return __gthread_mutex_trylock (__mutex);
283 __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
285 return __gthread_mutex_unlock (__mutex);
289 __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
291 return __gthread_mutex_destroy (__mutex);
296 #undef _GLIBCXX_UNUSED