* [Xenomai-core] user and kernel space
@ 2011-12-31 11:18 Jan-Erik Lange
2011-12-31 15:32 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Erik Lange @ 2011-12-31 11:18 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
Hello,
I have a question concerning user space and kernel space. I'm dealing with the native API and I read, that this API provides the same funtkions for both kernel and user space.
When looking at the sourcecode of buffer.h for example, there I find a section called public interface. When looking at the function rt_buffer_create(); for example, how does the Implementation von this function in userspace differs to the implementation for this function kernel space? Or is it the same implementation for user and kernel space.
Best regards
Jan
[-- Attachment #2: Type: text/html, Size: 854 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] user and kernel space
2011-12-31 11:18 [Xenomai-core] user and kernel space Jan-Erik Lange
@ 2011-12-31 15:32 ` Gilles Chanteperdrix
2012-01-01 12:56 ` Jan-Erik Lange
0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-12-31 15:32 UTC (permalink / raw)
To: Jan-Erik Lange; +Cc: xenomai
On 12/31/2011 12:18 PM, Jan-Erik Lange wrote:
>
> Hello,
>
> I have a question concerning user space and kernel space. I'm dealing
> with the native API and I read, that this API provides the same
> funtkions for both kernel and user space.
>
> When looking at the sourcecode of buffer.h for example, there I find
> a section called public interface. When looking at the function
> rt_buffer_create(); for example, how does the Implementation von this
> function in userspace differs to the implementation for this function
> kernel space? Or is it the same implementation for user and kernel
> space.
For most services such as buffer services, user functions emit system
calls which implementation in kernel-space use the corresponding kernel
service.
There are some exceptions such as mutexes implementation where we try
hard to avoid system calls and so provide both a user-space
implementation and a kernel-space implementation.
Another exception is the __xn_rdtsc() function, which relies on most
platforms on the same mechanism in user and kernel-space to access the
machine high resolution counter, and so has an identical implementation.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Xenomai-core] user and kernel space
2011-12-31 15:32 ` Gilles Chanteperdrix
@ 2012-01-01 12:56 ` Jan-Erik Lange
2012-01-01 20:54 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Erik Lange @ 2012-01-01 12:56 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]
> Date: Sat, 31 Dec 2011 16:32:20 +0100
> From: gilles.chanteperdrix@xenomai.org
> To: jan0385@domain.hid
> CC: xenomai@xenomai.org
> Subject: Re: [Xenomai-core] user and kernel space
>
> On 12/31/2011 12:18 PM, Jan-Erik Lange wrote:
> >
> > Hello,
> >
> > I have a question concerning user space and kernel space. I'm dealing
> > with the native API and I read, that this API provides the same
> > funtkions for both kernel and user space.
> >
> > When looking at the sourcecode of buffer.h for example, there I find
> > a section called public interface. When looking at the function
> > rt_buffer_create(); for example, how does the Implementation von this
> > function in userspace differs to the implementation for this function
> > kernel space? Or is it the same implementation for user and kernel
> > space.
>
> For most services such as buffer services, user functions emit system
> calls which implementation in kernel-space use the corresponding kernel
> service.
>
> There are some exceptions such as mutexes implementation where we try
> hard to avoid system calls and so provide both a user-space
> implementation and a kernel-space implementation.
Ok, but the names of the API function are the same for user and kernel space. How is it realized to take the implementation A for kernel space and the implementation B for userspace? Is this realzied in the linking process?
>
> Another exception is the __xn_rdtsc() function, which relies on most
> platforms on the same mechanism in user and kernel-space to access the
> machine high resolution counter, and so has an identical implementation.
>
>
> --
> Gilles.
[-- Attachment #2: Type: text/html, Size: 2284 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] user and kernel space
2012-01-01 12:56 ` Jan-Erik Lange
@ 2012-01-01 20:54 ` Gilles Chanteperdrix
0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2012-01-01 20:54 UTC (permalink / raw)
To: Jan-Erik Lange; +Cc: xenomai
On 01/01/2012 01:56 PM, Jan-Erik Lange wrote:
>
>
>
>
>> Date: Sat, 31 Dec 2011 16:32:20 +0100 From:
>> gilles.chanteperdrix@xenomai.org To: jan0385@domain.hid CC:
>> xenomai@xenomai.org Subject: Re: [Xenomai-core] user and kernel
>> space
>>
>> On 12/31/2011 12:18 PM, Jan-Erik Lange wrote:
>>>
>>> Hello,
>>>
>>> I have a question concerning user space and kernel space. I'm
>>> dealing with the native API and I read, that this API provides
>>> the same funtkions for both kernel and user space.
>>>
>>> When looking at the sourcecode of buffer.h for example, there I
>>> find a section called public interface. When looking at the
>>> function rt_buffer_create(); for example, how does the
>>> Implementation von this function in userspace differs to the
>>> implementation for this function kernel space? Or is it the same
>>> implementation for user and kernel space.
>>
>> For most services such as buffer services, user functions emit
>> system calls which implementation in kernel-space use the
>> corresponding kernel service.
>>
>> There are some exceptions such as mutexes implementation where we
>> try hard to avoid system calls and so provide both a user-space
>> implementation and a kernel-space implementation.
>
>
> Ok, but the names of the API function are the same for user and
> kernel space. How is it realized to take the implementation A for
> kernel space and the implementation B for userspace? Is this realzied
> in the linking process?
Yes, kernel and user-space are separated execution space, there is no
possible confusion.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-01 20:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-31 11:18 [Xenomai-core] user and kernel space Jan-Erik Lange
2011-12-31 15:32 ` Gilles Chanteperdrix
2012-01-01 12:56 ` Jan-Erik Lange
2012-01-01 20:54 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.