gthr-single.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
00028 #define _GLIBCXX_GCC_GTHR_SINGLE_H
00029
00030
00031
00032 typedef int __gthread_key_t;
00033 typedef int __gthread_once_t;
00034 typedef int __gthread_mutex_t;
00035 typedef int __gthread_recursive_mutex_t;
00036
00037 #define __GTHREAD_ONCE_INIT 0
00038 #define __GTHREAD_MUTEX_INIT 0
00039 #define __GTHREAD_RECURSIVE_MUTEX_INIT 0
00040
00041 #define _GLIBCXX_UNUSED __attribute__((unused))
00042
00043 #ifdef _LIBOBJC
00044
00045
00046 static void *thread_local_storage = NULL;
00047
00048
00049
00050
00051 static inline int
00052 __gthread_objc_init_thread_system (void)
00053 {
00054
00055 return -1;
00056 }
00057
00058
00059 static inline int
00060 __gthread_objc_close_thread_system (void)
00061 {
00062
00063 return -1;
00064 }
00065
00066
00067
00068
00069 static inline objc_thread_t
00070 __gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
00071 {
00072
00073 return NULL;
00074 }
00075
00076
00077 static inline int
00078 __gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
00079 {
00080
00081 return -1;
00082 }
00083
00084
00085 static inline int
00086 __gthread_objc_thread_get_priority (void)
00087 {
00088 return OBJC_THREAD_INTERACTIVE_PRIORITY;
00089 }
00090
00091
00092 static inline void
00093 __gthread_objc_thread_yield (void)
00094 {
00095 return;
00096 }
00097
00098
00099 static inline int
00100 __gthread_objc_thread_exit (void)
00101 {
00102
00103
00104
00105 return -1;
00106 }
00107
00108
00109 static inline objc_thread_t
00110 __gthread_objc_thread_id (void)
00111 {
00112
00113 return (objc_thread_t) 1;
00114 }
00115
00116
00117 static inline int
00118 __gthread_objc_thread_set_data (void *value)
00119 {
00120 thread_local_storage = value;
00121 return 0;
00122 }
00123
00124
00125 static inline void *
00126 __gthread_objc_thread_get_data (void)
00127 {
00128 return thread_local_storage;
00129 }
00130
00131
00132
00133
00134 static inline int
00135 __gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
00136 {
00137 return 0;
00138 }
00139
00140
00141 static inline int
00142 __gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
00143 {
00144 return 0;
00145 }
00146
00147
00148 static inline int
00149 __gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
00150 {
00151
00152 return 0;
00153 }
00154
00155
00156 static inline int
00157 __gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
00158 {
00159
00160 return 0;
00161 }
00162
00163
00164 static inline int
00165 __gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
00166 {
00167 return 0;
00168 }
00169
00170
00171
00172
00173 static inline int
00174 __gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
00175 {
00176 return 0;
00177 }
00178
00179
00180 static inline int
00181 __gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
00182 {
00183 return 0;
00184 }
00185
00186
00187 static inline int
00188 __gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
00189 objc_mutex_t mutex _GLIBCXX_UNUSED)
00190 {
00191 return 0;
00192 }
00193
00194
00195 static inline int
00196 __gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
00197 {
00198 return 0;
00199 }
00200
00201
00202 static inline int
00203 __gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
00204 {
00205 return 0;
00206 }
00207
00208 #else
00209
00210 static inline int
00211 __gthread_active_p (void)
00212 {
00213 return 0;
00214 }
00215
00216 static inline int
00217 __gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
00218 {
00219 return 0;
00220 }
00221
00222 static inline int _GLIBCXX_UNUSED
00223 __gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
00224 {
00225 return 0;
00226 }
00227
00228 static int _GLIBCXX_UNUSED
00229 __gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
00230 {
00231 return 0;
00232 }
00233
00234 static inline void *
00235 __gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
00236 {
00237 return 0;
00238 }
00239
00240 static inline int
00241 __gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
00242 {
00243 return 0;
00244 }
00245
00246 static inline int
00247 __gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
00248 {
00249 return 0;
00250 }
00251
00252 static inline int
00253 __gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
00254 {
00255 return 0;
00256 }
00257
00258 static inline int
00259 __gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
00260 {
00261 return 0;
00262 }
00263
00264 static inline int
00265 __gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
00266 {
00267 return 0;
00268 }
00269
00270 static inline int
00271 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
00272 {
00273 return __gthread_mutex_lock (__mutex);
00274 }
00275
00276 static inline int
00277 __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
00278 {
00279 return __gthread_mutex_trylock (__mutex);
00280 }
00281
00282 static inline int
00283 __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
00284 {
00285 return __gthread_mutex_unlock (__mutex);
00286 }
00287
00288 #endif
00289
00290 #undef _GLIBCXX_UNUSED
00291
00292 #endif