Re: userland supported APIs (was: Re: Synchronization primitives)
Re: userland supported APIs (was: Re: Synchronization primitives)
- Subject: Re: userland supported APIs (was: Re: Synchronization primitives)
- From: Army Research Lab <email@hidden>
- Date: Tue, 29 Apr 2008 12:28:54 -0400
- Thread-topic: userland supported APIs (was: Re: Synchronization primitives)
On 4/29/08 12:12 PM, "Dave Zarzycki" <email@hidden> wrote:
> On Apr 29, 2008, at 8:58 AM, Army Research Lab wrote:
>
>> On 4/29/08 11:20 AM, "Dave Zarzycki" <email@hidden> wrote:
>>
>>> On Apr 29, 2008, at 8:11 AM, Army Research Lab wrote:
>>>
>>>> Actually it is of quite a bit of use! My concern about the
>>>> OSAtomic*
>>>> functions is that they are all defined in libkern/OSAtomic.h. If I
>>>> understand Terry Lambert's earlier reply (sent to the list on
>>>> Thursday,
>>>> April 24, 2008, with the subject 'Re: Where is atomicqueue?'), I
>>>> should only
>>>> expect to be able to use this within the kernel (Note that that
>>>> earlier
>>>> conversation was about atomicqueue, and not about the other
>>>> functions, so
>>>> I'm interpreting what he said, and may be interpreting it
>>>> incorrectly.
>>>> Terry, please forgive me [and correct me!] if I'm wrong).
>>>>
>>>> I want to be able to use this from user space. Are there any
>>>> functions that
>>>> are supported from user space and capable of all that the OSAtomic*
>>>> functions are?
>>>
>>> We, Apple, have made a small confusing mess when it comes to
>>> OSAtomic.h. Both userland and kernel-land have a header by that name.
>>> Unfortunately, not all of the API within have the same names, with
>>> the
>>> same arguments. The userland header is located here: /usr/include/
>>> libkern/OSAtomic.h and is supported API.
>>
>> Does that mean that anything I find in /usr/include is supported in
>> userland? I mean, what Terry said made a lot of sense to mean, that
>> since
>> it is in libkern, we shouldn't use it. So, is there anything we
>> should stay
>> out of in /usr/include when in userland?
>
> To the best of my knowledge, there are no kernel ONLY headers in /usr/
> include. Kernel only headers are supposed to live in /System/Library/
> Frameworks/Kernel.framework/Headers.
>
> Please forgive us for the poorly named /usr/include/libkern/*.h
No problem, it happens :)
Can I make a suggestion though? If all of /usr/include truly *is* supported
in userland (including anything you symlink to that is outside of
/usr/include!), put in a README into /usr/include explaining that fact.
That way, anyone that decides to put stuff in there, including links to
other locations, is aware that they are expected to ensure userland support,
and anyone else that wants to link to stuff in there knows it is safe to do
so.
Thanks,
Cem Karan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden