• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Interlocked +1/-1 on Mac OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interlocked +1/-1 on Mac OS X?


  • Subject: Re: Interlocked +1/-1 on Mac OS X?
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 10 May 2006 15:24:45 -0400
  • Organization: Rogue Research

On 2006-05-10 12:14, Andy O'Meara said:

>Anyone know if there's a macro, CXX extension, gcc extension, POSIX call, or
>any other Mac OS X call that does an interlocked increment/decrement (adds 1
>or subtracts 1 to an integer).  Yes, I know I can use a mutex, but life is
>way easier (as well as overhead is a lot lower) when this kind of call is
>available (especially since these days the CPU has dedicated instruction for
>it).  For example, Win32 has them:
>
>long InterlockedIncrement( long* );
>long InterlockedDecrement( long* );

The first hit googling for "InterlockedIncrement mac" gives you your answer:

<http://lists.apple.com/archives/Darwin-development/2004/Jun/msg00111.html>

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Interlocked +1/-1 on Mac OS X? (From: "Andy O'Meara" <email@hidden>)

  • Prev by Date: Re: Programmatically changing "Open using Rosetta" flag
  • Next by Date: Re: A problem about StripAddress
  • Previous by thread: Re: Interlocked +1/-1 on Mac OS X?
  • Next by thread: Re: Programmatically changing "Open using Rosetta" flag
  • Index(es):
    • Date
    • Thread