[Xenomai] creating a user space task by RTDM library
gilles.chanteperdrix at xenomai.org
Sun Jun 15 15:44:22 CEST 2014
On 06/15/2014 03:42 PM, ali hagigat wrote:
> On 6/11/14, Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org> wrote:
>> On 06/11/2014 10:25 AM, ali hagigat wrote:
>>> On 6/11/14, Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>
>>>> On 06/10/2014 03:32 PM, ali hagigat wrote:
>>>>> Regarding xenomai 2.6.3, how rtdm_task_init() can be used in user
>>>>> space? and the types like rtdm_task_t. Compiling with rtdm/rtdm.h or
>>>>> rtdm/rtdm_driver.h produces errors.
>>>> RTDM is a kernel-space only skin.
>>> The RTDM documentation and the code comments report that
>>> rtdm_task_init() can be used in user space.
>> The documentation says that a "User space task" is a valid context to
>> call rtdm_task_init, but this means that a user-space task, currently
>> executing kernel code, is a valid context, not that the function may be
>> called from user-space. Really, RTDM is an API for writing drivers
>> residing in kernel-space, it makes no sense to use it in user-space.
> How a user-space task can execute kernel code? I wonder if you could
> write a short example. Thank you. (besides when a kernel code executes
> the context is not user any more, the context is kernel)
Every time a user-space task executes a syscall, some kernel-code is
executed on behalf of the user task. From Xenomai point of view, this
makes a difference whether the task is a kernel-space task or a
user-space task. For instance:
- current is valid
- xnshadow_thread(current) is non NULL.
This is the last answer I give to this stupid thread.
More information about the Xenomai