• 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: pthreads and standard C library calls and maybe magic Xcode switches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthreads and standard C library calls and maybe magic Xcode switches


  • Subject: Re: pthreads and standard C library calls and maybe magic Xcode switches
  • From: Cem Karan <email@hidden>
  • Date: Wed, 22 Aug 2007 07:37:05 -0400


On Aug 21, 2007, at 5:53 PM, Shawn Erickson wrote:

On 8/21/07, Cem Karan <email@hidden> wrote:

I'm continuing to work on my pthreads based program, and realized
that I've run into a potential problem.

I think you misunderstand what volatile means and when you need to use it.


In the examples you have given the use of volatile isn't needed since
the locking constructs you are using will ensure proper memory
barriers exist.

Are you saying that the locking constructs will ensure that the cache is always flushed back to main memory? That locking and unlocking is guaranteed as a sequence point for that, and therefore, regardless of how a function is compiled (e.g., linked in static library that wasn't volatile qualified), as long as there is a lock, it flushes to main memory? I was talking to one of my coworkers to find out if this is true, and he wasn't sure; that worried me because he is on the C standards committee, and knows a heck of a lot more than I do about all this...


Thanks,
Cem Karan
_______________________________________________
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


  • Follow-Ups:
    • Re: pthreads and standard C library calls and maybe magic Xcode switches
      • From: Jonas Maebe <email@hidden>
    • Re: pthreads and standard C library calls and maybe magic Xcode switches
      • From: Olivier Tristan <email@hidden>
References: 
 >pthreads and standard C library calls and maybe magic Xcode switches (From: Cem Karan <email@hidden>)
 >Re: pthreads and standard C library calls and maybe magic Xcode switches (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: What does 'Change to frame attempted' mean?
  • Next by Date: Re: pthreads and standard C library calls and maybe magic Xcode switches
  • Previous by thread: Re: pthreads and standard C library calls and maybe magic Xcode switches
  • Next by thread: Re: pthreads and standard C library calls and maybe magic Xcode switches
  • Index(es):
    • Date
    • Thread