DriverSynchronization.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:4k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       DriverSynchronization.h
  3.  
  4.      Contains:   Driver Synchronization Interfaces.
  5.  
  6.      Version:    Technology: MacOS 8
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1985-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DRIVERSYNCHRONIZATION__
  18. #define __DRIVERSYNCHRONIZATION__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __MACTYPES__
  23. #include "MacTypes.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. #if CALL_NOT_IN_CARBON
  42. EXTERN_API_C( void )
  43. SynchronizeIO                   (void)                                                      ONEWORDINLINE(0x4E71);
  44. #endif  /* CALL_NOT_IN_CARBON */
  45. EXTERN_API_C( Boolean )
  46. CompareAndSwap                  (UInt32                 oldVvalue,
  47.                                  UInt32                 newValue,
  48.                                  UInt32 *               OldValueAdr);
  49. EXTERN_API_C( Boolean )
  50. TestAndClear                    (UInt32                 bit,
  51.                                  UInt8 *                startAddress);
  52. EXTERN_API_C( Boolean )
  53. TestAndSet                      (UInt32                 bit,
  54.                                  UInt8 *                startAddress);
  55. EXTERN_API_C( SInt8 )
  56. IncrementAtomic8                (SInt8 *                value);
  57. EXTERN_API_C( SInt8 )
  58. DecrementAtomic8                (SInt8 *                value);
  59. EXTERN_API_C( SInt8 )
  60. AddAtomic8                      (SInt32                 amount,
  61.                                  SInt8 *                value);
  62. EXTERN_API_C( UInt8 )
  63. BitAndAtomic8                   (UInt32                 mask,
  64.                                  UInt8 *                value);
  65. EXTERN_API_C( UInt8 )
  66. BitOrAtomic8                    (UInt32                 mask,
  67.                                  UInt8 *                value);
  68. EXTERN_API_C( UInt8 )
  69. BitXorAtomic8                   (UInt32                 mask,
  70.                                  UInt8 *                value);
  71. EXTERN_API_C( SInt16 )
  72. IncrementAtomic16               (SInt16 *               value);
  73. EXTERN_API_C( SInt16 )
  74. DecrementAtomic16               (SInt16 *               value);
  75. EXTERN_API_C( SInt16 )
  76. AddAtomic16                     (SInt32                 amount,
  77.                                  SInt16 *               value);
  78. EXTERN_API_C( UInt16 )
  79. BitAndAtomic16                  (UInt32                 mask,
  80.                                  UInt16 *               value);
  81. EXTERN_API_C( UInt16 )
  82. BitOrAtomic16                   (UInt32                 mask,
  83.                                  UInt16 *               value);
  84. EXTERN_API_C( UInt16 )
  85. BitXorAtomic16                  (UInt32                 mask,
  86.                                  UInt16 *               value);
  87. EXTERN_API_C( SInt32 )
  88. IncrementAtomic                 (SInt32 *               value);
  89. EXTERN_API_C( SInt32 )
  90. DecrementAtomic                 (SInt32 *               value);
  91. EXTERN_API_C( SInt32 )
  92. AddAtomic                       (SInt32                 amount,
  93.                                  SInt32 *               value);
  94. EXTERN_API_C( UInt32 )
  95. BitAndAtomic                    (UInt32                 mask,
  96.                                  UInt32 *               value);
  97. EXTERN_API_C( UInt32 )
  98. BitOrAtomic                     (UInt32                 mask,
  99.                                  UInt32 *               value);
  100. EXTERN_API_C( UInt32 )
  101. BitXorAtomic                    (UInt32                 mask,
  102.                                  UInt32 *               value);
  103. #if PRAGMA_STRUCT_ALIGN
  104.     #pragma options align=reset
  105. #elif PRAGMA_STRUCT_PACKPUSH
  106.     #pragma pack(pop)
  107. #elif PRAGMA_STRUCT_PACK
  108.     #pragma pack()
  109. #endif
  110. #ifdef PRAGMA_IMPORT_OFF
  111. #pragma import off
  112. #elif PRAGMA_IMPORT
  113. #pragma import reset
  114. #endif
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif /* __DRIVERSYNCHRONIZATION__ */