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
00028
00029 #ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
00030 #define _GLIBCXX_GCC_GTHR_SINGLE_H
00031
00032
00033
00034 typedef int __gthread_mutex_t;
00035 typedef int __gthread_recursive_mutex_t;
00036
00037 #define __GTHREAD_MUTEX_INIT 0
00038
00039 #ifdef __cplusplus
00040 #define _GLIBCXX_UNUSED(x)
00041 #else
00042 #define _GLIBCXX_UNUSED(x) x __attribute__((unused))
00043 #endif
00044
00045 #ifdef _LIBOBJC
00046
00047
00048 static void *thread_local_storage = NULL;
00049
00050
00051
00052
00053 static inline int
00054 __gthread_objc_init_thread_system (void)
00055 {
00056
00057 return -1;
00058 }
00059
00060
00061 static inline int
00062 __gthread_objc_close_thread_system (void)
00063 {
00064
00065 return -1;
00066 }
00067
00068
00069
00070
00071 static inline objc_thread_t
00072 __gthread_objc_thread_detach (void (* func)(void *), void * _GLIBCXX_UNUSED(arg))
00073 {
00074
00075 return NULL;
00076 }
00077
00078
00079 static inline int
00080 __gthread_objc_thread_set_priority (int _GLIBCXX_UNUSED(priority))
00081 {
00082
00083 return -1;
00084 }
00085
00086
00087 static inline int
00088 __gthread_objc_thread_get_priority (void)
00089 {
00090 return OBJC_THREAD_INTERACTIVE_PRIORITY;
00091 }
00092
00093
00094 static inline void
00095 __gthread_objc_thread_yield (void)
00096 {
00097 return;
00098 }
00099
00100
00101 static inline int
00102 __gthread_objc_thread_exit (void)
00103 {
00104
00105
00106
00107 return -1;
00108 }
00109
00110
00111 static inline objc_thread_t
00112 __gthread_objc_thread_id (void)
00113 {
00114
00115 return (objc_thread_t) 1;
00116 }
00117
00118
00119 static inline int
00120 __gthread_objc_thread_set_data (void *value)
00121 {
00122 thread_local_storage = value;
00123 return 0;
00124 }
00125
00126
00127 static inline void *
00128 __gthread_objc_thread_get_data (void)
00129 {
00130 return thread_local_storage;
00131 }
00132
00133
00134
00135
00136 static inline int
00137 __gthread_objc_mutex_allocate (objc_mutex_t _GLIBCXX_UNUSED(mutex))
00138 {
00139 return 0;
00140 }
00141
00142
00143 static inline int
00144 __gthread_objc_mutex_deallocate (objc_mutex_t _GLIBCXX_UNUSED(mutex))
00145 {
00146 return 0;
00147 }
00148
00149
00150 static inline int
00151 __gthread_objc_mutex_lock (objc_mutex_t _GLIBCXX_UNUSED(mutex))
00152 {
00153
00154 return 0;
00155 }
00156
00157
00158 static inline int
00159 __gthread_objc_mutex_trylock (objc_mutex_t _GLIBCXX_UNUSED(mutex))
00160 {
00161
00162 return 0;
00163 }
00164
00165
00166 static inline int
00167 __gthread_objc_mutex_unlock (objc_mutex_t _GLIBCXX_UNUSED(mutex))
00168 {
00169 return 0;
00170 }
00171
00172
00173
00174
00175 static inline int
00176 __gthread_objc_condition_allocate (objc_condition_t _GLIBCXX_UNUSED(condition))
00177 {
00178 return 0;
00179 }
00180
00181
00182 static inline int
00183 __gthread_objc_condition_deallocate (objc_condition_t _GLIBCXX_UNUSED(condition))
00184 {
00185 return 0;
00186 }
00187
00188
00189 static inline int
00190 __gthread_objc_condition_wait (objc_condition_t _GLIBCXX_UNUSED(condition),
00191 objc_mutex_t _GLIBCXX_UNUSED(mutex))
00192 {
00193 return 0;
00194 }
00195
00196
00197 static inline int
00198 __gthread_objc_condition_broadcast (objc_condition_t _GLIBCXX_UNUSED(condition))
00199 {
00200 return 0;
00201 }
00202
00203
00204 static inline int
00205 __gthread_objc_condition_signal (objc_condition_t _GLIBCXX_UNUSED(condition))
00206 {
00207 return 0;
00208 }
00209
00210 #else
00211
00212 static inline int
00213 __gthread_active_p (void)
00214 {
00215 return 0;
00216 }
00217
00218 static inline int
00219 __gthread_mutex_lock (__gthread_mutex_t * _GLIBCXX_UNUSED(mutex))
00220 {
00221 return 0;
00222 }
00223
00224 static inline int
00225 __gthread_mutex_trylock (__gthread_mutex_t * _GLIBCXX_UNUSED(mutex))
00226 {
00227 return 0;
00228 }
00229
00230 static inline int
00231 __gthread_mutex_unlock (__gthread_mutex_t * _GLIBCXX_UNUSED(mutex))
00232 {
00233 return 0;
00234 }
00235
00236 static inline int
00237 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
00238 {
00239 return __gthread_mutex_lock (mutex);
00240 }
00241
00242 static inline int
00243 __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
00244 {
00245 return __gthread_mutex_trylock (mutex);
00246 }
00247
00248 static inline int
00249 __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
00250 {
00251 return __gthread_mutex_unlock (mutex);
00252 }
00253
00254 #endif
00255
00256 #undef _GLIBCXX_UNUSED
00257
00258 #endif