• 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
Getting 10.4 OSAtomic.h when targeting 10.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting 10.4 OSAtomic.h when targeting 10.5


  • Subject: Getting 10.4 OSAtomic.h when targeting 10.5
  • From: Wade Williams <email@hidden>
  • Date: Sat, 16 May 2009 15:39:43 -0500


In the 10.4 libkern/OSAtomic.h,  OSAtomicDecrement32Barrier is defined as:

inline static
int32_t OSAtomicDecrement32Barrier( int32_t *theValue )

while in the 10.5 libkern/OSAtomic.h, it's defined as:

inline static
int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue )

note the volatile qualifier on the parameter in the second case.

I don't claim to be an expert in it, but the second case certainly seems more correct.  How you can do an atomic operation without volatile seems suspect at best.

But...my application is targeting 10.5, but it is picking up the 10.4 header.

/Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/OSAtomic.h

The include statement is simply:

#include <libkern/OSAtomic.h>

Any thoughts on why it might be picking up the 10.4 header?  I've checked the various header search path build settings, but the only modifications to that are to point into my source tree - I certainly don't have the 10.4 SDK directory specified.

Thanks,

Wade
 _______________________________________________
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: Getting 10.4 OSAtomic.h when targeting 10.5
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: warning: declaration does not declare anything
  • Next by Date: WebServicesCore.framework link error
  • Previous by thread: Re: Java Debugger in XCode 3.1.2 hangs when inspecting variables
  • Next by thread: Re: Getting 10.4 OSAtomic.h when targeting 10.5
  • Index(es):
    • Date
    • Thread