• 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: Threading Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Threading Question


  • Subject: RE: Threading Question
  • From: Hari Karam Singh <email@hidden>
  • Date: Mon, 13 Feb 2012 09:22:53 +0000
  • Expiry-date: Thu, 12 Apr 2012 23:00:00 +0000
  • Organization: AncientBohemia Ltd.

> The code linked to does not have any memory barriers at all. There is
> nothing stopping writes from the memcpy (in
> TPCircularBufferProduceBytes) being reordered (by the CPU) such that
> they become visible after the OSAtomicAdd32 (in
> TPCircularBufferProduce). There needs to be a write barrier after the
> memcpy in order to be safe.

I noticed this before too.  Can't it be remedied just by adding "Barrier" to the end of the OSAtomic function names?  Also is there any reason not to "inline" these functions?

HKS


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

This email sent to email@hidden


  • Follow-Ups:
    • Re: Threading Question
      • From: Michael Tyson <email@hidden>
References: 
 >Re: Threading Question (From: Morgan Packard <email@hidden>)
 >Re: Threading Question (From: Kyle Sluder <email@hidden>)
 >Re: Threading Question (From: Michael Tyson <email@hidden>)
 >RE: Threading Question (From: email@hidden)

  • Prev by Date: Re: Threading Question
  • Next by Date: Re: Threading Question
  • Previous by thread: Re: Threading Question
  • Next by thread: Re: Threading Question
  • Index(es):
    • Date
    • Thread