Stephan Zimmermann wrote: > ... > P.S.: For running the attaced program, you need a > magic-parallel-port-interrupt-loopback-device. (Connecting pins 9 and 10 > of the parallel port will do the trick.)
...
> ------------------------------------------------------------------------
>
> #include <iostream>
> #include <sys/mman.h>
> #include <assert.h>
> #include "native/task.h"
> #include "native/timer.h"
> #include "native/queue.h"
> #include "native/intr.h"
>
> #include <signal.h>
> #include <sys/io.h>
>
> RT_TASK maintask;
> RT_TASK inttask;
> RT_TASK intcreatortask;
> RT_TASK queue_endtask;
>
> RT_INTR lptint;
>
> #define LPT_BASE 0x378
> #define LPT_INT 7
>
> #define PERIOD_TIME 10
> #define TIMEBASE 10000
...
>
> int main(void){
> std::cout << "xenomai interrupt test" << std::endl;
> mlockall(MCL_CURRENT | MCL_FUTURE);
>
> signal(SIGTERM, catch_signal);
> signal(SIGKILL, catch_signal);
> signal(SIGQUIT, catch_signal);
> signal(SIGINT , catch_signal);
>
> if (iopl(3)) {
> printf("iopl err\n");
> exit(1);
> }
>
> int err;
>
> err = rt_task_shadow (&maintask,"maintask",10,0);
> std::cout << "task shadow:" << err << std::endl;
>
> err = rt_timer_set_mode(TIMEBASE);
Do you know that you are requesting a timer tick rate of 100 kHz? I just
managed to lock up my poor 266 MHz board running your code. :)
Maybe we are seeing all this weird behaviour due to kernel stack
overruns. Try to switch on CONFIG_DEBUG_STACKOVERFLOW and
CONFIG_DEBUG_STACK_USAGE.
/me now watching what happens at 10 kHz...
Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
