RE: Problem using OSAtomic functions
RE: Problem using OSAtomic functions
- Subject: RE: Problem using OSAtomic functions
- From: "Carlos Silva" <email@hidden>
- Date: Tue, 31 Jan 2006 16:56:29 -0500
Thanks Derek (and Herb).
It was indeed the wrong header that was
being included.
Once I removed the “Atomic” from the
Compare function and went to its definition, the right header showed up.
Thank you for the help.
Carlos
From: Derek Kumar
[mailto:email@hidden]
Sent: Tuesday, January 31, 2006
2:40 PM
To: email@hidden
Cc: email@hidden
Subject: Re: Problem using
OSAtomic functions
Perhaps you're looking for OSCompareAndSwap()?
This page has some example usage:
There's an OSAtomicCompareAndSwap(), but it's from the user mode C
library.
(May be vaguely relevant: There was a mention of a possible gcc 4/xcode
issue with search paths that I recall from a while ago. If possible, try
passing the -v and --save-temps flags to gcc when building, and check (either
from the verbose output, from the generated intermediate pre-processed file)
that the correct header gets included).
Derek
On Jan 31, 2006, at 1:37 PM, Carlos Silva wrote:
Did I post this on the right list?
Has anyone ever used these functions at the kernel level?
TIA
Hello,
I am writing
a CoreAudio KEXT (based on the AudioReflectorDriver sample but I also tried
with the PhantomDriver sample) and I can not use any of the functions included
in <libkern/OSAtomic.h>..
I get a “was
not declared in this scope” compilation error.
Here’s a
code example:
#include
<libkern/OSAtomic.h>
class foo
{
UInt32 Temp;
void f()
{
OSAtomicCompareAndSwap(1, 0,
&Temp);
};
};
Any ideas?
Carlos
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Help/Unsubscribe/Update your Subscription:
|
_______________________________________________
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