probably error in api document
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
Quoted 17 lines · Harco Kuppens
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_tisr,rt_iack_tiack, int mode)says in its documentation :
This service can be called from:
* Kernel module initialization/cleanup code
* Kernel-based task
* *User-space task*
Quoted 5 lines
I find it strange that it could be called from a user-space task. I looked in
/usr/xenomai/include/native/intr.hbut 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.
Signature · 1 line
Gilles.
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
Quoted 31 lines · Gilles Chanteperdrix
Quoted 11 lines · Harco Kuppens
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_tisr,rt_iack_tiack, int mode)says in its documentation :
This service can be called from:
Quoted 9 lines
* 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.hbut 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 atnative/intr.h, you will see two
definitions ofrt_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_waitto wait for the next interrupt.
Quoted 3 lines · Harco Kuppens
yeah, that is what I read but the documenation for the kernel space version of
rt_int_createalso 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.
Signature · 1 line
Gilles.