All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan-Erik Lange <jan0385@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] user and kernel space
Date: Sat, 31 Dec 2011 16:32:20 +0100	[thread overview]
Message-ID: <4EFF2B04.1000209@domain.hid> (raw)
In-Reply-To: <BLU166-W39C682E7E76684CC152F0C4930@domain.hid>

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.


  reply	other threads:[~2011-12-31 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-31 11:18 [Xenomai-core] user and kernel space Jan-Erik Lange
2011-12-31 15:32 ` Gilles Chanteperdrix [this message]
2012-01-01 12:56   ` Jan-Erik Lange
2012-01-01 20:54     ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EFF2B04.1000209@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jan0385@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.