• 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
OSIncrementAtomic(), lck_mtx_lock() interoperability.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OSIncrementAtomic(), lck_mtx_lock() interoperability.


  • Subject: OSIncrementAtomic(), lck_mtx_lock() interoperability.
  • From: Matt Darland <email@hidden>
  • Date: Wed, 15 Nov 2006 16:04:59 -0600

If I have an integer value X that is usually incremented through OSIncrementAtomic, but in occasional cases I'm holding a mutex (via lck_mtx_lock) to a structure that contains X, and I want to increment X: Can I just ++X while holding the mutex and avoid also having to call OSIncrementAtomic in those rare cases? i.e. Do OSxxxAtomic and lck_mtx_xxx enforce the same memory coherency with respect to an integer?

----
Thanks,
Matt Darland
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: OSIncrementAtomic(), lck_mtx_lock() interoperability.
      • From: Terry Lambert <email@hidden>
  • Prev by Date: Re: How to build a new ISO 9660 FS and test it
  • Next by Date: Re: OSIncrementAtomic(), lck_mtx_lock() interoperability.
  • Previous by thread: Re: OT: Re: UDF file system driver
  • Next by thread: Re: OSIncrementAtomic(), lck_mtx_lock() interoperability.
  • Index(es):
    • Date
    • Thread