Skip to contentSkip to conversation

rt_intr_create issues

Xenomai-help Cédric Schaffter 3 participants 4 messages Nov 5, 2008

lore
Share & tools
lore
#0 lore raw

Hi List!

I'm writing a programm where I need to use interruptions.

To create it, I use the function "rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t iack, int mode)".

I included this header : #include <native/intr.h>.

When I compile, I get these error messages :

*error 'RT_INTR_HANDLED' undeclared
error too many arguments to function 'rt_intr_create'.*

When I observe the file intr.h, I see there are two rt_intr_create (the one with six arguments which I need and an other one with only four).

I tried to specifiy four parameters as requested by the other *rt_intr_create* and it works, so I don't think there is a problem with my include paths.

Does someone already have these issues or can help me?

In this file there is an other instruction that I don't understand :
"#if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)

Best regards,
Cédric Schaffter

#1 lore raw
Quoted 6 lines · Cédric Schaffter

Hi List!

I'm writing a programm where I need to use interruptions.

To create it, I use the function "rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t iack, int mode)".

Quoted 8 lines

I included this header : #include <native/intr.h>.

When I compile, I get these error messages :

*error 'RT_INTR_HANDLED' undeclared
error too many arguments to function 'rt_intr_create'.*

When I observe the file intr.h, I see there are two rt_intr_create (the one with six arguments which I need and an other one with only four).

The one with six parameters is for kernel apps, the other one with four parameters for userland which is probably the right one for you. Please see
http://www.xenomai.org/documentation/branches/v2.4.x/html/api/group__interrupt.html

Signature · 1 line
Sebastian
#2 lore raw
In reply to Cédric Schaffter
Quoted 17 lines · Cédric Schaffter

Hi List!

I'm writing a programm where I need to use interruptions.

To create it, I use the function "rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t iack, int mode)".

I included this header : #include <native/intr.h>.

When I compile, I get these error messages :

*error 'RT_INTR_HANDLED' undeclared
error too many arguments to function 'rt_intr_create'.*

When I observe the file intr.h, I see there are two rt_intr_create (the one with six arguments which I need and an other one with only four).

Quoted 8 lines

I tried to specifiy four parameters as requested by the other *rt_intr_create* and it works, so I don't think there is a problem with my include paths.

Does someone already have these issues or can help me?

In this file there is an other instruction that I don't understand :
"#if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)

__KERNEL__ is defined when compiling a kernel-space module; __XENO_SIM__ is defined when compiling for xenomai simulator (which is probably not your case);
DOXYGEN_CPP is defined when generating Xenomai documentation with doxygen.

Signature · 1 line
                                                 Gilles.
#3 lore raw
Quoted 21 lines · Gilles Chanteperdrix
Quoted 19 lines · Cédric Schaffter

Hi List!

I'm writing a programm where I need to use interruptions.

To create it, I use the function "rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, rt_isr_t isr, rt_iack_t iack, int mode)".

I included this header : #include <native/intr.h>.

When I compile, I get these error messages :

*error 'RT_INTR_HANDLED' undeclared
error too many arguments to function 'rt_intr_create'.*

When I observe the file intr.h, I see there are two rt_intr_create (the one with six arguments which I need and an other one with only four).

I tried to specifiy four parameters as requested by the other *rt_intr_create* and it works, so I don't think there is a problem with my include paths.

Does someone already have these issues or can help me?

Quoted 10 lines
Quoted 3 lines

In this file there is an other instruction that I don't understand :
"#if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)

__KERNEL__ is defined when compiling a kernel-space module; __XENO_SIM__ is defined when compiling for xenomai simulator (which is probably not your case);
DOXYGEN_CPP is defined when generating Xenomai documentation with doxygen.

Thanks Gilles and Sebastian !

Now it's clear.

Best regards,
Cédric