home *** CD-ROM | disk | FTP | other *** search
- /*
- File: DriverSynchronization.h
-
- Contains: Driver Synchronization Interfaces.
-
- Version: Technology: Sustem 7.5 and 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __DRIVERSYNCHRONIZATION__
- #define __DRIVERSYNCHRONIZATION__
-
- #ifndef __CONDITIONALMACROS__
- #include <ConditionalMacros.h>
- #endif
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #ifndef __SYNCHRONIZATION__
- #include <Synchronization.h>
- #endif
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- extern Boolean CompareAndSwap(UInt32 oldVvalue, UInt32 newValue, UInt32 *OldValueAdr);
-
- extern Boolean TestAndClear(UInt32 bit, UInt8 *startAddress);
-
- #if FOR_SYSTEM7_ONLY
- extern Boolean TestAndSet(UInt32 bit, UInt8 *startAddress);
-
- extern SInt8 IncrementAtomic8(SInt8 *value);
-
- extern SInt8 DecrementAtomic8(SInt8 *value);
-
- extern SInt8 AddAtomic8(SInt32 amount, SInt8 *value);
-
- extern UInt8 BitAndAtomic8(UInt32 mask, UInt8 *value);
-
- extern UInt8 BitOrAtomic8(UInt32 mask, UInt8 *value);
-
- extern UInt8 BitXorAtomic8(UInt32 mask, UInt8 *value);
-
- #endif
- extern SInt16 IncrementAtomic16(SInt16 *value);
-
- extern SInt16 DecrementAtomic16(SInt16 *value);
-
- extern SInt16 AddAtomic16(SInt32 amount, SInt16 *value);
-
- extern UInt16 BitAndAtomic16(UInt32 mask, UInt16 *value);
-
- extern UInt16 BitOrAtomic16(UInt32 mask, UInt16 *value);
-
- extern UInt16 BitXorAtomic16(UInt32 mask, UInt16 *value);
-
- extern SInt32 IncrementAtomic(SInt32 *value);
-
- extern SInt32 DecrementAtomic(SInt32 *value);
-
- extern SInt32 AddAtomic(SInt32 amount, SInt32 *value);
-
- extern UInt32 BitAndAtomic(UInt32 mask, UInt32 *value);
-
- extern UInt32 BitOrAtomic(UInt32 mask, UInt32 *value);
-
- extern UInt32 BitXorAtomic(UInt32 mask, UInt32 *value);
-
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __DRIVERSYNCHRONIZATION__ */
-
-