Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

353 lines
6.9 KiB

  1. /*
  2. File: DriverSynchronization.h
  3. Contains: Driver Synchronization Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1985-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __DRIVERSYNCHRONIZATION__
  11. #define __DRIVERSYNCHRONIZATION__
  12. #ifndef __CONDITIONALMACROS__
  13. #include <ConditionalMacros.h>
  14. #endif
  15. #ifndef __MACTYPES__
  16. #include <MacTypes.h>
  17. #endif
  18. #if PRAGMA_ONCE
  19. #pragma once
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if PRAGMA_IMPORT
  25. #pragma import on
  26. #endif
  27. #if CALL_NOT_IN_CARBON
  28. /*
  29. * SynchronizeIO()
  30. *
  31. * Availability:
  32. * Non-Carbon CFM: in DriverServicesLib 1.0 and later
  33. * CarbonLib: not available
  34. * Mac OS X: not available
  35. */
  36. EXTERN_API_C( void )
  37. SynchronizeIO(void) ONEWORDINLINE(0x4E71);
  38. #endif /* CALL_NOT_IN_CARBON */
  39. /*
  40. * CompareAndSwap()
  41. *
  42. * Availability:
  43. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  44. * CarbonLib: in CarbonLib 1.0 and later
  45. * Mac OS X: in version 10.0 and later
  46. */
  47. EXTERN_API_C( Boolean )
  48. CompareAndSwap(
  49. UInt32 oldVvalue,
  50. UInt32 newValue,
  51. UInt32 * OldValueAdr);
  52. /*
  53. * TestAndClear()
  54. *
  55. * Availability:
  56. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  57. * CarbonLib: in CarbonLib 1.0 and later
  58. * Mac OS X: in version 10.0 and later
  59. */
  60. EXTERN_API_C( Boolean )
  61. TestAndClear(
  62. UInt32 bit,
  63. UInt8 * startAddress);
  64. /*
  65. * TestAndSet()
  66. *
  67. * Availability:
  68. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  69. * CarbonLib: in CarbonLib 1.0 and later
  70. * Mac OS X: in version 10.0 and later
  71. */
  72. EXTERN_API_C( Boolean )
  73. TestAndSet(
  74. UInt32 bit,
  75. UInt8 * startAddress);
  76. /*
  77. * IncrementAtomic8()
  78. *
  79. * Availability:
  80. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  81. * CarbonLib: in CarbonLib 1.0 and later
  82. * Mac OS X: in version 10.0 and later
  83. */
  84. EXTERN_API_C( SInt8 )
  85. IncrementAtomic8(SInt8 * value);
  86. /*
  87. * DecrementAtomic8()
  88. *
  89. * Availability:
  90. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  91. * CarbonLib: in CarbonLib 1.0 and later
  92. * Mac OS X: in version 10.0 and later
  93. */
  94. EXTERN_API_C( SInt8 )
  95. DecrementAtomic8(SInt8 * value);
  96. /*
  97. * AddAtomic8()
  98. *
  99. * Availability:
  100. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  101. * CarbonLib: in CarbonLib 1.0 and later
  102. * Mac OS X: in version 10.0 and later
  103. */
  104. EXTERN_API_C( SInt8 )
  105. AddAtomic8(
  106. SInt32 amount,
  107. SInt8 * value);
  108. /*
  109. * BitAndAtomic8()
  110. *
  111. * Availability:
  112. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  113. * CarbonLib: in CarbonLib 1.0 and later
  114. * Mac OS X: in version 10.0 and later
  115. */
  116. EXTERN_API_C( UInt8 )
  117. BitAndAtomic8(
  118. UInt32 mask,
  119. UInt8 * value);
  120. /*
  121. * BitOrAtomic8()
  122. *
  123. * Availability:
  124. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  125. * CarbonLib: in CarbonLib 1.0 and later
  126. * Mac OS X: in version 10.0 and later
  127. */
  128. EXTERN_API_C( UInt8 )
  129. BitOrAtomic8(
  130. UInt32 mask,
  131. UInt8 * value);
  132. /*
  133. * BitXorAtomic8()
  134. *
  135. * Availability:
  136. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  137. * CarbonLib: in CarbonLib 1.0 and later
  138. * Mac OS X: in version 10.0 and later
  139. */
  140. EXTERN_API_C( UInt8 )
  141. BitXorAtomic8(
  142. UInt32 mask,
  143. UInt8 * value);
  144. /*
  145. * IncrementAtomic16()
  146. *
  147. * Availability:
  148. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  149. * CarbonLib: in CarbonLib 1.0 and later
  150. * Mac OS X: in version 10.0 and later
  151. */
  152. EXTERN_API_C( SInt16 )
  153. IncrementAtomic16(SInt16 * value);
  154. /*
  155. * DecrementAtomic16()
  156. *
  157. * Availability:
  158. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  159. * CarbonLib: in CarbonLib 1.0 and later
  160. * Mac OS X: in version 10.0 and later
  161. */
  162. EXTERN_API_C( SInt16 )
  163. DecrementAtomic16(SInt16 * value);
  164. /*
  165. * AddAtomic16()
  166. *
  167. * Availability:
  168. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  169. * CarbonLib: in CarbonLib 1.0 and later
  170. * Mac OS X: in version 10.0 and later
  171. */
  172. EXTERN_API_C( SInt16 )
  173. AddAtomic16(
  174. SInt32 amount,
  175. SInt16 * value);
  176. /*
  177. * BitAndAtomic16()
  178. *
  179. * Availability:
  180. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  181. * CarbonLib: in CarbonLib 1.0 and later
  182. * Mac OS X: in version 10.0 and later
  183. */
  184. EXTERN_API_C( UInt16 )
  185. BitAndAtomic16(
  186. UInt32 mask,
  187. UInt16 * value);
  188. /*
  189. * BitOrAtomic16()
  190. *
  191. * Availability:
  192. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  193. * CarbonLib: in CarbonLib 1.0 and later
  194. * Mac OS X: in version 10.0 and later
  195. */
  196. EXTERN_API_C( UInt16 )
  197. BitOrAtomic16(
  198. UInt32 mask,
  199. UInt16 * value);
  200. /*
  201. * BitXorAtomic16()
  202. *
  203. * Availability:
  204. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  205. * CarbonLib: in CarbonLib 1.0 and later
  206. * Mac OS X: in version 10.0 and later
  207. */
  208. EXTERN_API_C( UInt16 )
  209. BitXorAtomic16(
  210. UInt32 mask,
  211. UInt16 * value);
  212. /*
  213. * IncrementAtomic()
  214. *
  215. * Availability:
  216. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  217. * CarbonLib: in CarbonLib 1.0 and later
  218. * Mac OS X: in version 10.0 and later
  219. */
  220. EXTERN_API_C( SInt32 )
  221. IncrementAtomic(SInt32 * value);
  222. /*
  223. * DecrementAtomic()
  224. *
  225. * Availability:
  226. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  227. * CarbonLib: in CarbonLib 1.0 and later
  228. * Mac OS X: in version 10.0 and later
  229. */
  230. EXTERN_API_C( SInt32 )
  231. DecrementAtomic(SInt32 * value);
  232. /*
  233. * AddAtomic()
  234. *
  235. * Availability:
  236. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  237. * CarbonLib: in CarbonLib 1.0 and later
  238. * Mac OS X: in version 10.0 and later
  239. */
  240. EXTERN_API_C( SInt32 )
  241. AddAtomic(
  242. SInt32 amount,
  243. SInt32 * value);
  244. /*
  245. * BitAndAtomic()
  246. *
  247. * Availability:
  248. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  249. * CarbonLib: in CarbonLib 1.0 and later
  250. * Mac OS X: in version 10.0 and later
  251. */
  252. EXTERN_API_C( UInt32 )
  253. BitAndAtomic(
  254. UInt32 mask,
  255. UInt32 * value);
  256. /*
  257. * BitOrAtomic()
  258. *
  259. * Availability:
  260. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  261. * CarbonLib: in CarbonLib 1.0 and later
  262. * Mac OS X: in version 10.0 and later
  263. */
  264. EXTERN_API_C( UInt32 )
  265. BitOrAtomic(
  266. UInt32 mask,
  267. UInt32 * value);
  268. /*
  269. * BitXorAtomic()
  270. *
  271. * Availability:
  272. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  273. * CarbonLib: in CarbonLib 1.0 and later
  274. * Mac OS X: in version 10.0 and later
  275. */
  276. EXTERN_API_C( UInt32 )
  277. BitXorAtomic(
  278. UInt32 mask,
  279. UInt32 * value);
  280. #ifdef PRAGMA_IMPORT_OFF
  281. #pragma import off
  282. #elif PRAGMA_IMPORT
  283. #pragma import reset
  284. #endif
  285. #ifdef __cplusplus
  286. }
  287. #endif
  288. #endif /* __DRIVERSYNCHRONIZATION__ */