gccxml_gem 0.9.1-x86-cygwin → 0.9.2-x86-cygwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. data/Rakefile +5 -1
  2. data/bin/gccxml.exe +0 -0
  3. data/bin/gccxml_cc1plus +0 -0
  4. data/bin/gccxml_cc1plus.exe +0 -0
  5. data/gccxml.rb +5 -5
  6. data/share/doc/gccxml-0.9/Copyright.txt +0 -0
  7. data/share/doc/gccxml-0.9/gccxml.html +0 -0
  8. data/share/doc/gccxml-0.9/gccxml.txt +0 -0
  9. data/share/gccxml-0.9/Borland/5.5/Wrappers/algorithm +0 -0
  10. data/share/gccxml-0.9/Borland/5.5/Wrappers/algorithm.h +0 -0
  11. data/share/gccxml-0.9/Borland/5.5/Wrappers/bitset +0 -0
  12. data/share/gccxml-0.9/Borland/5.5/Wrappers/bitset.h +0 -0
  13. data/share/gccxml-0.9/Borland/5.5/Wrappers/cctype +0 -0
  14. data/share/gccxml-0.9/Borland/5.5/Wrappers/cfloat +0 -0
  15. data/share/gccxml-0.9/Borland/5.5/Wrappers/climits +0 -0
  16. data/share/gccxml-0.9/Borland/5.5/Wrappers/cmath +0 -0
  17. data/share/gccxml-0.9/Borland/5.5/Wrappers/complex +0 -0
  18. data/share/gccxml-0.9/Borland/5.5/Wrappers/complex.h +0 -0
  19. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstddef +0 -0
  20. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstdio +0 -0
  21. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstdlib +0 -0
  22. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstring +0 -0
  23. data/share/gccxml-0.9/Borland/5.5/Wrappers/cstring.h +0 -0
  24. data/share/gccxml-0.9/Borland/5.5/Wrappers/ctime +0 -0
  25. data/share/gccxml-0.9/Borland/5.5/Wrappers/cwchar +0 -0
  26. data/share/gccxml-0.9/Borland/5.5/Wrappers/cwctype +0 -0
  27. data/share/gccxml-0.9/Borland/5.5/Wrappers/deque +0 -0
  28. data/share/gccxml-0.9/Borland/5.5/Wrappers/deque.h +0 -0
  29. data/share/gccxml-0.9/Borland/5.5/Wrappers/exception +0 -0
  30. data/share/gccxml-0.9/Borland/5.5/Wrappers/exception.h +0 -0
  31. data/share/gccxml-0.9/Borland/5.5/Wrappers/fstream +0 -0
  32. data/share/gccxml-0.9/Borland/5.5/Wrappers/fstream.h +0 -0
  33. data/share/gccxml-0.9/Borland/5.5/Wrappers/function +0 -0
  34. data/share/gccxml-0.9/Borland/5.5/Wrappers/function.h +0 -0
  35. data/share/gccxml-0.9/Borland/5.5/Wrappers/functional +0 -0
  36. data/share/gccxml-0.9/Borland/5.5/Wrappers/gccxml_typeinfo.h +0 -0
  37. data/share/gccxml-0.9/Borland/5.5/Wrappers/iomanip +0 -0
  38. data/share/gccxml-0.9/Borland/5.5/Wrappers/iomanip.h +0 -0
  39. data/share/gccxml-0.9/Borland/5.5/Wrappers/ios +0 -0
  40. data/share/gccxml-0.9/Borland/5.5/Wrappers/ios.h +0 -0
  41. data/share/gccxml-0.9/Borland/5.5/Wrappers/iosfwd +0 -0
  42. data/share/gccxml-0.9/Borland/5.5/Wrappers/iosfwd.h +0 -0
  43. data/share/gccxml-0.9/Borland/5.5/Wrappers/iostream +0 -0
  44. data/share/gccxml-0.9/Borland/5.5/Wrappers/iostream.h +0 -0
  45. data/share/gccxml-0.9/Borland/5.5/Wrappers/istream +0 -0
  46. data/share/gccxml-0.9/Borland/5.5/Wrappers/istream.h +0 -0
  47. data/share/gccxml-0.9/Borland/5.5/Wrappers/iterator +0 -0
  48. data/share/gccxml-0.9/Borland/5.5/Wrappers/iterator.h +0 -0
  49. data/share/gccxml-0.9/Borland/5.5/Wrappers/limits +0 -0
  50. data/share/gccxml-0.9/Borland/5.5/Wrappers/limits.h +0 -0
  51. data/share/gccxml-0.9/Borland/5.5/Wrappers/list +0 -0
  52. data/share/gccxml-0.9/Borland/5.5/Wrappers/list.h +0 -0
  53. data/share/gccxml-0.9/Borland/5.5/Wrappers/locale +0 -0
  54. data/share/gccxml-0.9/Borland/5.5/Wrappers/locale.h +0 -0
  55. data/share/gccxml-0.9/Borland/5.5/Wrappers/map +0 -0
  56. data/share/gccxml-0.9/Borland/5.5/Wrappers/map.h +0 -0
  57. data/share/gccxml-0.9/Borland/5.5/Wrappers/memory +0 -0
  58. data/share/gccxml-0.9/Borland/5.5/Wrappers/memory.h +0 -0
  59. data/share/gccxml-0.9/Borland/5.5/Wrappers/new +0 -0
  60. data/share/gccxml-0.9/Borland/5.5/Wrappers/new.h +0 -0
  61. data/share/gccxml-0.9/Borland/5.5/Wrappers/numeric +0 -0
  62. data/share/gccxml-0.9/Borland/5.5/Wrappers/numeric.h +0 -0
  63. data/share/gccxml-0.9/Borland/5.5/Wrappers/ostream +0 -0
  64. data/share/gccxml-0.9/Borland/5.5/Wrappers/ostream.h +0 -0
  65. data/share/gccxml-0.9/Borland/5.5/Wrappers/queue +0 -0
  66. data/share/gccxml-0.9/Borland/5.5/Wrappers/queue.h +0 -0
  67. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/codecvt +0 -0
  68. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/collate +0 -0
  69. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/ctype +0 -0
  70. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iosbase +0 -0
  71. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iotraits +0 -0
  72. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iterator +0 -0
  73. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/lochelp +0 -0
  74. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/locimpl +0 -0
  75. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/locvector +0 -0
  76. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/messages +0 -0
  77. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/money +0 -0
  78. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/numbrw +0 -0
  79. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/numeral +0 -0
  80. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwdispatch.h +0 -0
  81. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwlocale +0 -0
  82. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwstderr_macros.h +0 -0
  83. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/string_ref +0 -0
  84. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/time +0 -0
  85. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/traits +0 -0
  86. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/tree +0 -0
  87. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/usefacet +0 -0
  88. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/valimp +0 -0
  89. data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/vendor +0 -0
  90. data/share/gccxml-0.9/Borland/5.5/Wrappers/set +0 -0
  91. data/share/gccxml-0.9/Borland/5.5/Wrappers/set.h +0 -0
  92. data/share/gccxml-0.9/Borland/5.5/Wrappers/sstream +0 -0
  93. data/share/gccxml-0.9/Borland/5.5/Wrappers/sstream.h +0 -0
  94. data/share/gccxml-0.9/Borland/5.5/Wrappers/stack +0 -0
  95. data/share/gccxml-0.9/Borland/5.5/Wrappers/stack.h +0 -0
  96. data/share/gccxml-0.9/Borland/5.5/Wrappers/stdexcept +0 -0
  97. data/share/gccxml-0.9/Borland/5.5/Wrappers/stdexcept.h +0 -0
  98. data/share/gccxml-0.9/Borland/5.5/Wrappers/streambuf +0 -0
  99. data/share/gccxml-0.9/Borland/5.5/Wrappers/streambuf.h +0 -0
  100. data/share/gccxml-0.9/Borland/5.5/Wrappers/string +0 -0
  101. data/share/gccxml-0.9/Borland/5.5/Wrappers/string.h +0 -0
  102. data/share/gccxml-0.9/Borland/5.5/Wrappers/strstream +0 -0
  103. data/share/gccxml-0.9/Borland/5.5/Wrappers/strstream.h +0 -0
  104. data/share/gccxml-0.9/Borland/5.5/Wrappers/typeinfo +0 -0
  105. data/share/gccxml-0.9/Borland/5.5/Wrappers/typeinfo.h +0 -0
  106. data/share/gccxml-0.9/Borland/5.5/Wrappers/utility +0 -0
  107. data/share/gccxml-0.9/Borland/5.5/Wrappers/utility.h +0 -0
  108. data/share/gccxml-0.9/Borland/5.5/Wrappers/valarray +0 -0
  109. data/share/gccxml-0.9/Borland/5.5/Wrappers/valarray.h +0 -0
  110. data/share/gccxml-0.9/Borland/5.5/Wrappers/vector +0 -0
  111. data/share/gccxml-0.9/Borland/5.5/Wrappers/vector.h +0 -0
  112. data/share/gccxml-0.9/Borland/5.5/except.h +0 -0
  113. data/share/gccxml-0.9/Borland/5.5/gccxml_fstream.h +0 -0
  114. data/share/gccxml-0.9/Borland/5.5/gccxml_new.h +0 -0
  115. data/share/gccxml-0.9/Borland/5.5/gccxml_valarray.h +0 -0
  116. data/share/gccxml-0.9/Borland/5.5/gccxml_vector.h +0 -0
  117. data/share/gccxml-0.9/Borland/5.5/io.h +0 -0
  118. data/share/gccxml-0.9/Borland/5.5/oaidl.h +0 -0
  119. data/share/gccxml-0.9/Borland/5.5/propidl.h +0 -0
  120. data/share/gccxml-0.9/Borland/5.5/rw/locimpl.h +0 -0
  121. data/share/gccxml-0.9/Borland/5.5/rw/rwlocale.h +0 -0
  122. data/share/gccxml-0.9/Borland/5.5/stdarg.h +0 -0
  123. data/share/gccxml-0.9/Borland/5.5/valarray.cc +0 -0
  124. data/share/gccxml-0.9/GCC/2.95/algorithm +0 -0
  125. data/share/gccxml-0.9/GCC/2.95/bitset +0 -0
  126. data/share/gccxml-0.9/GCC/2.95/cctype +0 -0
  127. data/share/gccxml-0.9/GCC/2.95/clocale +0 -0
  128. data/share/gccxml-0.9/GCC/2.95/cmath +0 -0
  129. data/share/gccxml-0.9/GCC/2.95/complex +0 -0
  130. data/share/gccxml-0.9/GCC/2.95/csetjmp +0 -0
  131. data/share/gccxml-0.9/GCC/2.95/csignal +0 -0
  132. data/share/gccxml-0.9/GCC/2.95/cstdarg +0 -0
  133. data/share/gccxml-0.9/GCC/2.95/cstddef +0 -0
  134. data/share/gccxml-0.9/GCC/2.95/cstdio +0 -0
  135. data/share/gccxml-0.9/GCC/2.95/cstdlib +0 -0
  136. data/share/gccxml-0.9/GCC/2.95/cstring +0 -0
  137. data/share/gccxml-0.9/GCC/2.95/ctime +0 -0
  138. data/share/gccxml-0.9/GCC/2.95/cwchar +0 -0
  139. data/share/gccxml-0.9/GCC/2.95/cwctype +0 -0
  140. data/share/gccxml-0.9/GCC/2.95/deque +0 -0
  141. data/share/gccxml-0.9/GCC/2.95/exception +0 -0
  142. data/share/gccxml-0.9/GCC/2.95/fstream +0 -0
  143. data/share/gccxml-0.9/GCC/2.95/functional +0 -0
  144. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +0 -0
  145. data/share/gccxml-0.9/GCC/2.95/iomanip +0 -0
  146. data/share/gccxml-0.9/GCC/2.95/iosfwd +0 -0
  147. data/share/gccxml-0.9/GCC/2.95/iostream +0 -0
  148. data/share/gccxml-0.9/GCC/2.95/iterator +0 -0
  149. data/share/gccxml-0.9/GCC/2.95/list +0 -0
  150. data/share/gccxml-0.9/GCC/2.95/map +0 -0
  151. data/share/gccxml-0.9/GCC/2.95/memory +0 -0
  152. data/share/gccxml-0.9/GCC/2.95/new +0 -0
  153. data/share/gccxml-0.9/GCC/2.95/numeric +0 -0
  154. data/share/gccxml-0.9/GCC/2.95/pthread.h +0 -0
  155. data/share/gccxml-0.9/GCC/2.95/queue +0 -0
  156. data/share/gccxml-0.9/GCC/2.95/set +0 -0
  157. data/share/gccxml-0.9/GCC/2.95/sstream +0 -0
  158. data/share/gccxml-0.9/GCC/2.95/stack +0 -0
  159. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +0 -0
  160. data/share/gccxml-0.9/GCC/2.95/std/complext.h +0 -0
  161. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +0 -0
  162. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +0 -0
  163. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +0 -0
  164. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +0 -0
  165. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +0 -0
  166. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +0 -0
  167. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +0 -0
  168. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +0 -0
  169. data/share/gccxml-0.9/GCC/2.95/std/straits.h +0 -0
  170. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +0 -0
  171. data/share/gccxml-0.9/GCC/2.95/stdexcept +0 -0
  172. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +0 -0
  173. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +0 -0
  174. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +0 -0
  175. data/share/gccxml-0.9/GCC/2.95/stl_list.h +0 -0
  176. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +0 -0
  177. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +0 -0
  178. data/share/gccxml-0.9/GCC/2.95/string +0 -0
  179. data/share/gccxml-0.9/GCC/2.95/strstream +0 -0
  180. data/share/gccxml-0.9/GCC/2.95/typeinfo +0 -0
  181. data/share/gccxml-0.9/GCC/2.95/utility +0 -0
  182. data/share/gccxml-0.9/GCC/2.95/valarray +0 -0
  183. data/share/gccxml-0.9/GCC/2.95/vector +0 -0
  184. data/share/gccxml-0.9/GCC/2.96/sstream +0 -0
  185. data/share/gccxml-0.9/GCC/3.0/pthread.h +0 -0
  186. data/share/gccxml-0.9/GCC/3.1/pthread.h +0 -0
  187. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +0 -0
  188. data/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h +581 -0
  189. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +0 -0
  190. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +0 -0
  191. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +0 -0
  192. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +0 -0
  193. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +0 -0
  194. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +0 -0
  195. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +0 -0
  196. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +0 -0
  197. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +0 -0
  198. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +0 -0
  199. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +0 -0
  200. data/share/gccxml-0.9/GCC/3.2/fstream +0 -0
  201. data/share/gccxml-0.9/GCC/3.2/pthread.h +0 -0
  202. data/share/gccxml-0.9/GCC/3.2/sstream +0 -0
  203. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +0 -0
  204. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +0 -0
  205. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +0 -0
  206. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +0 -0
  207. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +0 -0
  208. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +0 -0
  209. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +0 -0
  210. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +0 -0
  211. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +0 -0
  212. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +0 -0
  213. data/share/gccxml-0.9/GCC/3.3/fstream +0 -0
  214. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +0 -0
  215. data/share/gccxml-0.9/GCC/3.3/sstream +0 -0
  216. data/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h +664 -0
  217. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +0 -0
  218. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +0 -0
  219. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +0 -0
  220. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +0 -0
  221. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +0 -0
  222. data/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h +182 -0
  223. data/share/gccxml-0.9/IBM/8.0/adapt_headers.sh +34 -0
  224. data/share/gccxml-0.9/IBM/8.0/stdlib.h.patch +27 -0
  225. data/share/gccxml-0.9/IBM/8.0/xstring.patch +19 -0
  226. data/share/gccxml-0.9/IBM/README +8 -0
  227. data/share/gccxml-0.9/IBM/find_flags +51 -0
  228. data/share/gccxml-0.9/IBM/find_flags_common +48 -0
  229. data/share/gccxml-0.9/Intel/find_flags +1 -1
  230. data/share/gccxml-0.9/Intel/pthread.h +0 -0
  231. data/share/gccxml-0.9/MIPSpro/7.3/exception +0 -0
  232. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +0 -0
  233. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +0 -0
  234. data/share/gccxml-0.9/MIPSpro/7.3/ostream +0 -0
  235. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +0 -0
  236. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +0 -0
  237. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +0 -0
  238. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +0 -0
  239. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +0 -0
  240. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +0 -0
  241. data/share/gccxml-0.9/MIPSpro/7.3/string +0 -0
  242. data/share/gccxml-0.9/MIPSpro/find_flags +13 -80
  243. data/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx +63 -0
  244. data/share/gccxml-0.9/Sun/5.8/{adaptation.patch → Cstd.patch} +96 -108
  245. data/share/gccxml-0.9/Sun/5.8/adapt_headers.sh +32 -0
  246. data/share/gccxml-0.9/Sun/5.8/std-5.10.patch +22 -0
  247. data/share/gccxml-0.9/Sun/README +4 -4
  248. data/share/gccxml-0.9/Sun/find_flags +20 -38
  249. data/share/gccxml-0.9/Sun/find_flags_common +42 -0
  250. data/share/gccxml-0.9/gccxml_config +1 -1
  251. data/share/gccxml-0.9/gccxml_identify_compiler.cc +13 -0
  252. data/share/man/man1/gccxml.1 +1 -1
  253. metadata +28 -42
  254. data/share/gccxml-0.9/GCC/find_flags +0 -105
  255. data/share/gccxml-0.9/Sun/adapt_headers.sh +0 -24
  256. data/share/gccxml-0.9/gccxml_find_flags +0 -93
@@ -0,0 +1,581 @@
1
+ /* Threads compatibility routines for libgcc2 and libobjc. */
2
+ /* Compile this one with gcc. */
3
+ /* Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
4
+
5
+ This file is part of GCC.
6
+
7
+ GCC is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU General Public License as published by the Free
9
+ Software Foundation; either version 2, or (at your option) any later
10
+ version.
11
+
12
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15
+ for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with GCC; see the file COPYING. If not, write to the Free
19
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20
+ 02111-1307, USA. */
21
+
22
+ /* As a special exception, if you link this library with other files,
23
+ some of which are compiled with GCC, to produce an executable,
24
+ this library does not by itself cause the resulting executable
25
+ to be covered by the GNU General Public License.
26
+ This exception does not however invalidate any other reasons why
27
+ the executable file might be covered by the GNU General Public License. */
28
+
29
+ #ifndef _GLIBCPP_GCC_GTHR_POSIX_H
30
+ #define _GLIBCPP_GCC_GTHR_POSIX_H
31
+
32
+ /* POSIX threads specific definitions.
33
+ Easy, since the interface is just one-to-one mapping. */
34
+
35
+ #define __GTHREADS 1
36
+
37
+ #include <pthread.h>
38
+
39
+ typedef pthread_key_t __gthread_key_t;
40
+ typedef pthread_once_t __gthread_once_t;
41
+ typedef pthread_mutex_t __gthread_mutex_t;
42
+
43
+ #define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
44
+ #define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
45
+
46
+ #if _GLIBCPP_SUPPORTS_WEAK && _GLIBCPP_GTHREAD_USE_WEAK && defined __GNUC_RH_RELEASE__ && __GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 3 && __GNUC_RH_RELEASE__ > 53 && !defined __attribute__
47
+ # define __gthrw(name) \
48
+ extern __typeof(name) __gthrw_ ## name
49
+
50
+ __gthrw(pthread_once);
51
+ __gthrw(pthread_key_create);
52
+ __gthrw(pthread_key_delete);
53
+ __gthrw(pthread_getspecific);
54
+ __gthrw(pthread_setspecific);
55
+ __gthrw(pthread_create);
56
+
57
+ __gthrw(pthread_mutex_lock );
58
+ __gthrw(pthread_mutex_trylock );
59
+ __gthrw(pthread_mutex_unlock );
60
+
61
+ #ifdef _LIBOBJC
62
+ /* Objective C. */
63
+ __gthrw(pthread_cond_broadcast);
64
+ __gthrw(pthread_cond_destroy);
65
+ __gthrw(pthread_cond_init);
66
+ __gthrw(pthread_cond_signal);
67
+ __gthrw(pthread_cond_wait);
68
+ __gthrw(pthread_exit);
69
+ __gthrw(pthread_mutex_init);
70
+ __gthrw(pthread_mutex_destroy);
71
+ __gthrw(pthread_self);
72
+ __gthrw(sched_get_priority_max);
73
+ __gthrw(sched_get_priority_min);
74
+ __gthrw(sched_yield);
75
+ __gthrw(pthread_attr_destroy);
76
+ __gthrw(pthread_attr_init);
77
+ __gthrw(pthread_attr_setdetachstate);
78
+ __gthrw(pthread_getschedparam);
79
+ __gthrw(pthread_setschedparam);
80
+ #endif
81
+ #else
82
+ #if _GLIBCPP_SUPPORTS_WEAK && _GLIBCPP_GTHREAD_USE_WEAK
83
+
84
+ #pragma weak pthread_once
85
+ #pragma weak pthread_key_create
86
+ #pragma weak pthread_key_delete
87
+ #pragma weak pthread_getspecific
88
+ #pragma weak pthread_setspecific
89
+ #pragma weak pthread_create
90
+
91
+ #pragma weak pthread_mutex_lock
92
+ #pragma weak pthread_mutex_trylock
93
+ #pragma weak pthread_mutex_unlock
94
+
95
+ #ifdef _LIBOBJC
96
+ /* Objective C. */
97
+ #pragma weak pthread_cond_broadcast
98
+ #pragma weak pthread_cond_destroy
99
+ #pragma weak pthread_cond_init
100
+ #pragma weak pthread_cond_signal
101
+ #pragma weak pthread_cond_wait
102
+ #pragma weak pthread_exit
103
+ #pragma weak pthread_mutex_init
104
+ #pragma weak pthread_mutex_destroy
105
+ #pragma weak pthread_self
106
+ #pragma weak sched_get_priority_max
107
+ #pragma weak sched_get_priority_min
108
+ #pragma weak sched_yield
109
+ #pragma weak pthread_attr_destroy
110
+ #pragma weak pthread_attr_init
111
+ #pragma weak pthread_attr_setdetachstate
112
+ #pragma weak pthread_getschedparam
113
+ #pragma weak pthread_setschedparam
114
+ #endif
115
+ #endif
116
+
117
+ #define __gthrw_pthread_once pthread_once
118
+ #define __gthrw_pthread_key_create pthread_key_create
119
+ #define __gthrw_pthread_key_delete pthread_key_delete
120
+ #define __gthrw_pthread_getspecific pthread_getspecific
121
+ #define __gthrw_pthread_setspecific pthread_setspecific
122
+ #define __gthrw_pthread_create pthread_create
123
+
124
+ #define __gthrw_pthread_mutex_lock pthread_mutex_lock
125
+ #define __gthrw_pthread_mutex_trylock pthread_mutex_trylock
126
+ #define __gthrw_pthread_mutex_unlock pthread_mutex_unlock
127
+
128
+ #ifdef _LIBOBJC
129
+ /* Objective C. */
130
+ #define __gthrw_pthread_cond_broadcast pthread_cond_broadcast
131
+ #define __gthrw_pthread_cond_destroy pthread_cond_destroy
132
+ #define __gthrw_pthread_cond_init pthread_cond_init
133
+ #define __gthrw_pthread_cond_signal pthread_cond_signal
134
+ #define __gthrw_pthread_cond_wait pthread_cond_wait
135
+ #define __gthrw_pthread_exit pthread_exit
136
+ #define __gthrw_pthread_mutex_init pthread_mutex_init
137
+ #define __gthrw_pthread_mutex_destroy pthread_mutex_destroy
138
+ #define __gthrw_pthread_self pthread_self
139
+ #define __gthrw_sched_get_priority_max sched_get_priority_max
140
+ #define __gthrw_sched_get_priority_min sched_get_priority_min
141
+ #define __gthrw_sched_yield sched_yield
142
+ #define __gthrw_pthread_attr_destroy pthread_attr_destroy
143
+ #define __gthrw_pthread_attr_init pthread_attr_init
144
+ #define __gthrw_pthread_attr_setdetachstate pthread_attr_setdetachstate
145
+ #define __gthrw_pthread_getschedparam pthread_getschedparam
146
+ #define __gthrw_pthread_setschedparam pthread_setschedparam
147
+ #endif
148
+ #endif
149
+
150
+ #if _GLIBCPP_SUPPORTS_WEAK && _GLIBCPP_GTHREAD_USE_WEAK
151
+
152
+ static inline int
153
+ __gthread_active_p (void)
154
+ {
155
+ static void *const __gthread_active_ptr = (void *) &__gthrw_pthread_create;
156
+ return __gthread_active_ptr != 0;
157
+ }
158
+
159
+ #else /* not _GLIBCPP_SUPPORTS_WEAK */
160
+
161
+ static inline int
162
+ __gthread_active_p (void)
163
+ {
164
+ return 1;
165
+ }
166
+
167
+ #endif /* _GLIBCPP_SUPPORTS_WEAK */
168
+
169
+ #ifdef _LIBOBJC
170
+
171
+ /* This is the config.h file in libobjc/ */
172
+ #include <config.h>
173
+
174
+ #ifdef HAVE_SCHED_H
175
+ # include <sched.h>
176
+ #endif
177
+
178
+ /* Key structure for maintaining thread specific storage */
179
+ static pthread_key_t _objc_thread_storage;
180
+ static pthread_attr_t _objc_thread_attribs;
181
+
182
+ /* Thread local storage for a single thread */
183
+ static void *thread_local_storage = NULL;
184
+
185
+ /* Backend initialization functions */
186
+
187
+ /* Initialize the threads subsystem. */
188
+ static inline int
189
+ __gthread_objc_init_thread_system(void)
190
+ {
191
+ if (__gthread_active_p ())
192
+ {
193
+ /* Initialize the thread storage key */
194
+ if (__gthrw_pthread_key_create(&_objc_thread_storage, NULL) == 0)
195
+ {
196
+ /* The normal default detach state for threads is
197
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
198
+ * when you think they should. */
199
+ if (__gthrw_pthread_attr_init(&_objc_thread_attribs) == 0
200
+ && __gthrw_pthread_attr_setdetachstate(&_objc_thread_attribs,
201
+ PTHREAD_CREATE_DETACHED) == 0)
202
+ return 0;
203
+ }
204
+ }
205
+
206
+ return -1;
207
+ }
208
+
209
+ /* Close the threads subsystem. */
210
+ static inline int
211
+ __gthread_objc_close_thread_system(void)
212
+ {
213
+ if (__gthread_active_p ()
214
+ && __gthrw_pthread_key_delete(_objc_thread_storage) == 0
215
+ && __gthrw_pthread_attr_destroy(&_objc_thread_attribs) == 0)
216
+ return 0;
217
+
218
+ return -1;
219
+ }
220
+
221
+ /* Backend thread functions */
222
+
223
+ /* Create a new thread of execution. */
224
+ static inline objc_thread_t
225
+ __gthread_objc_thread_detach(void (*func)(void *), void *arg)
226
+ {
227
+ objc_thread_t thread_id;
228
+ pthread_t new_thread_handle;
229
+
230
+ if (!__gthread_active_p ())
231
+ return NULL;
232
+
233
+ if ( !(__gthrw_pthread_create(&new_thread_handle, NULL, (void *)func, arg)) )
234
+ thread_id = (objc_thread_t) new_thread_handle;
235
+ else
236
+ thread_id = NULL;
237
+
238
+ return thread_id;
239
+ }
240
+
241
+ /* Set the current thread's priority. */
242
+ static inline int
243
+ __gthread_objc_thread_set_priority(int priority)
244
+ {
245
+ if (!__gthread_active_p())
246
+ return -1;
247
+ else {
248
+ pthread_t thread_id = __gthrw_pthread_self();
249
+ int policy;
250
+ struct sched_param params;
251
+ int priority_min, priority_max;
252
+
253
+ if (__gthrw_pthread_getschedparam(thread_id, &policy, &params) == 0)
254
+ {
255
+ if ((priority_max = __gthrw_sched_get_priority_max(policy)) != 0)
256
+ return -1;
257
+
258
+ if ((priority_min = __gthrw_sched_get_priority_min(policy)) != 0)
259
+ return -1;
260
+
261
+ if (priority > priority_max)
262
+ priority = priority_max;
263
+ else if (priority < priority_min)
264
+ priority = priority_min;
265
+ params.sched_priority = priority;
266
+
267
+ /*
268
+ * The solaris 7 and several other man pages incorrectly state that
269
+ * this should be a pointer to policy but pthread.h is universally
270
+ * at odds with this.
271
+ */
272
+ if (__gthrw_pthread_setschedparam(thread_id, policy, &params) == 0)
273
+ return 0;
274
+ }
275
+ return -1;
276
+ }
277
+ }
278
+
279
+ /* Return the current thread's priority. */
280
+ static inline int
281
+ __gthread_objc_thread_get_priority(void)
282
+ {
283
+ if (__gthread_active_p ())
284
+ {
285
+ int policy;
286
+ struct sched_param params;
287
+
288
+ if (__gthrw_pthread_getschedparam(__gthrw_pthread_self(), &policy, &params) == 0)
289
+ return params.sched_priority;
290
+ else
291
+ return -1;
292
+ }
293
+ else
294
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
295
+ }
296
+
297
+ /* Yield our process time to another thread. */
298
+ static inline void
299
+ __gthread_objc_thread_yield(void)
300
+ {
301
+ if (__gthread_active_p ())
302
+ __gthrw_sched_yield();
303
+ }
304
+
305
+ /* Terminate the current thread. */
306
+ static inline int
307
+ __gthread_objc_thread_exit(void)
308
+ {
309
+ if (__gthread_active_p ())
310
+ /* exit the thread */
311
+ __gthrw_pthread_exit(&__objc_thread_exit_status);
312
+
313
+ /* Failed if we reached here */
314
+ return -1;
315
+ }
316
+
317
+ /* Returns an integer value which uniquely describes a thread. */
318
+ static inline objc_thread_t
319
+ __gthread_objc_thread_id(void)
320
+ {
321
+ if (__gthread_active_p ())
322
+ return (objc_thread_t) __gthrw_pthread_self();
323
+ else
324
+ return (objc_thread_t) 1;
325
+ }
326
+
327
+ /* Sets the thread's local storage pointer. */
328
+ static inline int
329
+ __gthread_objc_thread_set_data(void *value)
330
+ {
331
+ if (__gthread_active_p ())
332
+ return __gthrw_pthread_setspecific(_objc_thread_storage, value);
333
+ else
334
+ {
335
+ thread_local_storage = value;
336
+ return 0;
337
+ }
338
+ }
339
+
340
+ /* Returns the thread's local storage pointer. */
341
+ static inline void *
342
+ __gthread_objc_thread_get_data(void)
343
+ {
344
+ if (__gthread_active_p ())
345
+ return __gthrw_pthread_getspecific(_objc_thread_storage);
346
+ else
347
+ return thread_local_storage;
348
+ }
349
+
350
+ /* Backend mutex functions */
351
+
352
+ /* Allocate a mutex. */
353
+ static inline int
354
+ __gthread_objc_mutex_allocate(objc_mutex_t mutex)
355
+ {
356
+ if (__gthread_active_p ())
357
+ {
358
+ mutex->backend = objc_malloc(sizeof(pthread_mutex_t));
359
+
360
+ if (__gthrw_pthread_mutex_init((pthread_mutex_t *)mutex->backend, NULL))
361
+ {
362
+ objc_free(mutex->backend);
363
+ mutex->backend = NULL;
364
+ return -1;
365
+ }
366
+ }
367
+
368
+ return 0;
369
+ }
370
+
371
+ /* Deallocate a mutex. */
372
+ static inline int
373
+ __gthread_objc_mutex_deallocate(objc_mutex_t mutex)
374
+ {
375
+ if (__gthread_active_p ())
376
+ {
377
+ int count;
378
+
379
+ /*
380
+ * Posix Threads specifically require that the thread be unlocked
381
+ * for __gthrw_pthread_mutex_destroy to work.
382
+ */
383
+
384
+ do
385
+ {
386
+ count = __gthrw_pthread_mutex_unlock((pthread_mutex_t *)mutex->backend);
387
+ if (count < 0)
388
+ return -1;
389
+ }
390
+ while (count);
391
+
392
+ if (__gthrw_pthread_mutex_destroy((pthread_mutex_t *)mutex->backend))
393
+ return -1;
394
+
395
+ objc_free(mutex->backend);
396
+ mutex->backend = NULL;
397
+ }
398
+ return 0;
399
+ }
400
+
401
+ /* Grab a lock on a mutex. */
402
+ static inline int
403
+ __gthread_objc_mutex_lock(objc_mutex_t mutex)
404
+ {
405
+ if (__gthread_active_p ()
406
+ && __gthrw_pthread_mutex_lock((pthread_mutex_t *)mutex->backend) != 0)
407
+ {
408
+ return -1;
409
+ }
410
+
411
+ return 0;
412
+ }
413
+
414
+ /* Try to grab a lock on a mutex. */
415
+ static inline int
416
+ __gthread_objc_mutex_trylock(objc_mutex_t mutex)
417
+ {
418
+ if (__gthread_active_p ()
419
+ && __gthrw_pthread_mutex_trylock((pthread_mutex_t *)mutex->backend) != 0)
420
+ {
421
+ return -1;
422
+ }
423
+
424
+ return 0;
425
+ }
426
+
427
+ /* Unlock the mutex */
428
+ static inline int
429
+ __gthread_objc_mutex_unlock(objc_mutex_t mutex)
430
+ {
431
+ if (__gthread_active_p ()
432
+ && __gthrw_pthread_mutex_unlock((pthread_mutex_t *)mutex->backend) != 0)
433
+ {
434
+ return -1;
435
+ }
436
+
437
+ return 0;
438
+ }
439
+
440
+ /* Backend condition mutex functions */
441
+
442
+ /* Allocate a condition. */
443
+ static inline int
444
+ __gthread_objc_condition_allocate(objc_condition_t condition)
445
+ {
446
+ if (__gthread_active_p ())
447
+ {
448
+ condition->backend = objc_malloc(sizeof(pthread_cond_t));
449
+
450
+ if (__gthrw_pthread_cond_init((pthread_cond_t *)condition->backend, NULL))
451
+ {
452
+ objc_free(condition->backend);
453
+ condition->backend = NULL;
454
+ return -1;
455
+ }
456
+ }
457
+
458
+ return 0;
459
+ }
460
+
461
+ /* Deallocate a condition. */
462
+ static inline int
463
+ __gthread_objc_condition_deallocate(objc_condition_t condition)
464
+ {
465
+ if (__gthread_active_p ())
466
+ {
467
+ if (__gthrw_pthread_cond_destroy((pthread_cond_t *)condition->backend))
468
+ return -1;
469
+
470
+ objc_free(condition->backend);
471
+ condition->backend = NULL;
472
+ }
473
+ return 0;
474
+ }
475
+
476
+ /* Wait on the condition */
477
+ static inline int
478
+ __gthread_objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex)
479
+ {
480
+ if (__gthread_active_p ())
481
+ return __gthrw_pthread_cond_wait((pthread_cond_t *)condition->backend,
482
+ (pthread_mutex_t *)mutex->backend);
483
+ else
484
+ return 0;
485
+ }
486
+
487
+ /* Wake up all threads waiting on this condition. */
488
+ static inline int
489
+ __gthread_objc_condition_broadcast(objc_condition_t condition)
490
+ {
491
+ if (__gthread_active_p ())
492
+ return __gthrw_pthread_cond_broadcast((pthread_cond_t *)condition->backend);
493
+ else
494
+ return 0;
495
+ }
496
+
497
+ /* Wake up one thread waiting on this condition. */
498
+ static inline int
499
+ __gthread_objc_condition_signal(objc_condition_t condition)
500
+ {
501
+ if (__gthread_active_p ())
502
+ return __gthrw_pthread_cond_signal((pthread_cond_t *)condition->backend);
503
+ else
504
+ return 0;
505
+ }
506
+
507
+ #else /* _LIBOBJC */
508
+
509
+ static inline int
510
+ __gthread_once (__gthread_once_t *once, void (*func) (void))
511
+ {
512
+ if (__gthread_active_p ())
513
+ return __gthrw_pthread_once (once, func);
514
+ else
515
+ return -1;
516
+ }
517
+
518
+ static inline int
519
+ __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
520
+ {
521
+ return __gthrw_pthread_key_create (key, dtor);
522
+ }
523
+
524
+ static inline int
525
+ __gthread_key_dtor (__gthread_key_t key, void *ptr)
526
+ {
527
+ /* Just reset the key value to zero. */
528
+ if (ptr)
529
+ return __gthrw_pthread_setspecific (key, 0);
530
+ else
531
+ return 0;
532
+ }
533
+
534
+ static inline int
535
+ __gthread_key_delete (__gthread_key_t key)
536
+ {
537
+ return __gthrw_pthread_key_delete (key);
538
+ }
539
+
540
+ static inline void *
541
+ __gthread_getspecific (__gthread_key_t key)
542
+ {
543
+ return __gthrw_pthread_getspecific (key);
544
+ }
545
+
546
+ static inline int
547
+ __gthread_setspecific (__gthread_key_t key, const void *ptr)
548
+ {
549
+ return __gthrw_pthread_setspecific (key, ptr);
550
+ }
551
+
552
+ static inline int
553
+ __gthread_mutex_lock (__gthread_mutex_t *mutex)
554
+ {
555
+ if (__gthread_active_p ())
556
+ return __gthrw_pthread_mutex_lock (mutex);
557
+ else
558
+ return 0;
559
+ }
560
+
561
+ static inline int
562
+ __gthread_mutex_trylock (__gthread_mutex_t *mutex)
563
+ {
564
+ if (__gthread_active_p ())
565
+ return __gthrw_pthread_mutex_trylock (mutex);
566
+ else
567
+ return 0;
568
+ }
569
+
570
+ static inline int
571
+ __gthread_mutex_unlock (__gthread_mutex_t *mutex)
572
+ {
573
+ if (__gthread_active_p ())
574
+ return __gthrw_pthread_mutex_unlock (mutex);
575
+ else
576
+ return 0;
577
+ }
578
+
579
+ #endif /* _LIBOBJC */
580
+
581
+ #endif /* ! _GLIBCPP_GCC_GTHR_POSIX_H */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes