Re: OSSpinLockInit in OSX
Shantonu Sen <[email protected]> Fri, 06 May 2011 10:40:29 -0700
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
See the header file:
/*! @abstract The default value for an <code>OSSpinLock</code>.
@discussion
The convention is that unlocked is zero, locked is nonzero.
*/
#define OS_SPINLOCK_INIT 0
Shantonu Sen
[email protected]
On May 6, 2011, at 10:36 AM, Nathan Sims wrote:
> I'm porting some C code from Linux which uses OSSpinLock function calls.
> OSX has the same functions (declated in OSAtomic.h):
> • OSSpinLockLock()
> • OSSpinLockTry()
> • OSSpinLockUnlock()
>
> However, OSX is missing this function:
>
> • OSSpinLockInit()
>
> Is there no initialization needed for an OSSpinLock?
>
> _______________________________________________
> MacOSX-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/macosx-dev