Re: Using Darwin headers
Re: Using Darwin headers
- Subject: Re: Using Darwin headers
- From: Nathan Day <email@hidden>
- Date: Sun, 23 Jun 2002 22:50:47 +0930
How about these below, I use these all the time. There part of PCI Card
Services but the documentation says
"Carbon does not support most PCI card services functions. In Mac OS X,
all code that communicates directly with PCI cards must use the IOKit
API.
However, Carbon does support many utility functions in the
DriverServices.h and DriverSynchronization .h headers (such as time
conversion and atomic memory functions) which have little or nothing to
do with drivers. Several functions are useful, for example, to perform
multiprocessing operations. In the future, these APIs may be moved into
different header files."
Boolean CompareAndSwap( long oldValue, long newValue, long *Value );
SInt32 IncrementAtomic( SInt32 *value );
SInt32 DecrementAtomic( SInt32 *value );
SInt32 AddAtomic( SInt32 amount, SInt32 *value );
UInt32 BitAndAtomic( UInt32 mask, UInt32 *value );
UInt32 BitOrAtomic( UInt32 mask, UInt32 *value );
UInt32 BitXorAtomic( UInt32 mask, UInt32 *value );
SInt16 IncrementAtomic16( SInt16 * value );
SInt16 DecrementAtomic16( SInt16 * value );
SInt16 AddAtomic16( SInt32 amount, SInt16 * value );
UInt16 BitAndAtomic16( UInt32 mask, UInt16 * value );
UInt16 BitOrAtomic16( UInt32 mask, UInt16 * value );
UInt16 BitXorAtomic16( UInt32 mask, UInt16 * value );
SInt8 IncrementAtomic8( SInt8 * value );
SInt8 DecrementAtomic8( SInt8 * value );
SInt8 AddAtomic8( SInt32 amount, SInt8 *value );
UInt8 BitAndAtomic8( UInt32 mask, UInt8 *value );
UInt8 BitOrAtomic8( UInt32 mask, UInt8 *value );
UInt8 BitXorAtomic8( UInt32 mask, UInt8 *value );
Boolean TestAndSet( UInt32 bit, UInt8 *startAddress );
Boolean TestAndClear( UInt32 bit, UInt8 *startAddress );
On Saturday, June 22, 2002, at 10:14 PM, Chris Purcell wrote:
Rats. Can you suggest the best way to code atomic operations in a user
space application?
Kritter out
Does anyone know how to use Darwin headers in a Cocoa app?
Specifically, I want to use OSAtomicOperations.h functions, but can't
persuade the linker.
You can't use KERNEL headers in a USER SPACE application.
-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.