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