All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] probably error in api document
@ 2008-09-15  9:53 Harco Kuppens
  2008-09-15 14:16 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Harco Kuppens @ 2008-09-15  9:53 UTC (permalink / raw)
  To: xenomai; +Cc: hooman >> "Hooman, J."

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

Hi,

I noticed in the Xenomai native API that  the longer rt_create_intr :

    int rt_intr_create 
<http://www.xenomai.org/documentation/trunk/html/api/group__interrupt.html#ga0a9d98556ec838008f408a56e79d304> 
(RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t 
iack, int mode)

says in its documentation :

    This service can be called from:

        * Kernel module initialization/cleanup code
        * Kernel-based task
        * *User-space task*

I find it strange that it could be called from a user-space task.
I looked in /usr/xenomai/include/native/intr.h but there it really is 
defined when __KERNEL__ is defined.

So I guess this is an error in the  API documention?

Best Regards,
Harco Kuppens


[-- Attachment #2: Type: text/html, Size: 1054 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] probably error in api document
  2008-09-15  9:53 [Xenomai-help] probably error in api document Harco Kuppens
@ 2008-09-15 14:16 ` Gilles Chanteperdrix
  2008-09-15 15:26   ` Harco Kuppens
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2008-09-15 14:16 UTC (permalink / raw)
  To: Harco Kuppens; +Cc: xenomai, hooman >> "Hooman, J."

Harco Kuppens wrote:
> Hi,
> 
> I noticed in the Xenomai native API that  the longer rt_create_intr :
> 
>     int rt_intr_create 
> <http://www.xenomai.org/documentation/trunk/html/api/group__interrupt.html#ga0a9d98556ec838008f408a56e79d304> 
> (RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t 
> iack, int mode)
> 
> says in its documentation :
> 
>     This service can be called from:
> 
>         * Kernel module initialization/cleanup code
>         * Kernel-based task
>         * *User-space task*
> 
> I find it strange that it could be called from a user-space task.
> I looked in /usr/xenomai/include/native/intr.h but there it really is 
> defined when __KERNEL__ is defined.
> 
> So I guess this is an error in the  API documention?

No, there is no error: the service is implemented both in user-space and
 kernel-space, and if you look at native/intr.h, you will see two
definitions of rt_intr_create: one for kernel-space and one for user-space.

Note however that the interface in user-space is not the same as in
kernel-space, that is because in user-space, you are supposed to call
rt_intr_wait to wait for the next interrupt.

-- 
                                                 Gilles.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] probably error in api document
  2008-09-15 14:16 ` Gilles Chanteperdrix
@ 2008-09-15 15:26   ` Harco Kuppens
  2008-09-21 18:28     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Harco Kuppens @ 2008-09-15 15:26 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]

yeah, that is what I read but the documenation for the kernel space 
version of rt_int_create also says that it can be called from a user 
space task. I think that is a mistake in the documentation.

best regards
Harco Kuppens

Gilles Chanteperdrix wrote:
> Harco Kuppens wrote:
>   
>> Hi,
>>
>> I noticed in the Xenomai native API that  the longer rt_create_intr :
>>
>>     int rt_intr_create 
>> <http://www.xenomai.org/documentation/trunk/html/api/group__interrupt.html#ga0a9d98556ec838008f408a56e79d304> 
>> (RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t 
>> iack, int mode)
>>
>> says in its documentation :
>>
>>     This service can be called from:
>>
>>         * Kernel module initialization/cleanup code
>>         * Kernel-based task
>>         * *User-space task*
>>
>> I find it strange that it could be called from a user-space task.
>> I looked in /usr/xenomai/include/native/intr.h but there it really is 
>> defined when __KERNEL__ is defined.
>>
>> So I guess this is an error in the  API documention?
>>     
>
> No, there is no error: the service is implemented both in user-space and
>  kernel-space, and if you look at native/intr.h, you will see two
> definitions of rt_intr_create: one for kernel-space and one for user-space.
>
> Note however that the interface in user-space is not the same as in
> kernel-space, that is because in user-space, you are supposed to call
> rt_intr_wait to wait for the next interrupt.
>   



[-- Attachment #2: Type: text/html, Size: 2006 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] probably error in api document
  2008-09-15 15:26   ` Harco Kuppens
@ 2008-09-21 18:28     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2008-09-21 18:28 UTC (permalink / raw)
  To: Harco Kuppens; +Cc: xenomai

Harco Kuppens wrote:
> yeah, that is what I read but the documenation for the kernel space 
> version of rt_int_create also says that it can be called from a user 
> space task. I think that is a mistake in the documentation.

This should be fixed now, thanks.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-21 18:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15  9:53 [Xenomai-help] probably error in api document Harco Kuppens
2008-09-15 14:16 ` Gilles Chanteperdrix
2008-09-15 15:26   ` Harco Kuppens
2008-09-21 18:28     ` 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.