On Wed, 2007-02-07 at 15:58 +0100, Stephan Zimmermann wrote: > Hello, > I get the following message and a completely frozen system when I run my > applications after upgrading to branches/v2.3.x rev. 2137. (Everything > worked fine on revision 2077) > > 'Xenomai: fatal: re-enqueuing a relaxed thread in the RPI queue' > > Maybe I did s.th. stupid again?
No, I did, by committing a half-baked patch attempting to fix a priority inversion seen with the pSOS emulator. Now really, really fixed by #2139 in v2.3.x, and #2140 in trunk/. Hopefully. > > I did 'svn -r 2137 up' in the source directory and recompiled > everything (kernel, xenomai, my application). It's a AMD-X2 with Kernel > 2.6.17.14, running Debian Sarge. My colleague tells me he saw the same > when experimenting with trunk. > > some additional infos: > > 'svn info' gives me: > ------------------------------------------------------------------ > linux1:~/xenomai_svn_test/xenomai$ svn info > Pfad: . > URL: http://svn.gna.org/svn/xenomai/branches/v2.3.x > UUID des Projektarchivs: c6d672ea-8702-0410-b560-f74c916a59fe > Revision: 2137 > Knotentyp: Verzeichnis > Plan: normal > Letzter Autor: rpm > Letzte geänderte Rev: 2137 > Letztes Änderungsdatum: 2007-02-07 12:13:48 +0100 (Mi, 07 Feb 2007) > Eigenschaften zuletzt geändert: 2007-01-22 13:20:30 +0100 (Mo, 22 Jan 2007) > > > the following code leads to the crash, shortly after entering main(): > -------------------------------------------------------------------- > #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 <sys/io.h> > > RT_TASK maintask; > RT_TASK inttask; > RT_TASK intcreatortask; > > #define LPT_BASE 0x378 > #define LPT_INT 7 > > bool finish = false; > > void int_task(void* cookie){ > int err = 0; > int counter = 0; > RT_INTR lptint; > > err = rt_intr_create(&lptint,"parp_int",7,0); > std::cout << "interrupt create:" << err << std::endl; > > err = rt_intr_enable(&lptint); > std::cout << "interrupt enable:" << err << std::endl; > > // switch int mode on > outb_p(0x10, LPT_BASE + 2); > > // all pins = 0 > outb_p(0x00, LPT_BASE ); > > while(!finish){ > err = rt_intr_wait(&lptint, 100); > if(err >= 0 ){ > counter++; > std::cout << "got " << err << " loop: " << counter << > std::endl; > } > } > > err = rt_intr_disable(&lptint); > std::cout << "interrupt disable:" << err << std::endl; > > err = rt_intr_delete(&lptint); > std::cout << "interrupt delete:" << err << std::endl; > } > > void int_creator_task(void* cookie){ > char ob = 0x00; > for(int i = 0; i < 1000; i++){ > rt_task_sleep(100); > outb_p(ob,LPT_BASE); > if(ob){ > ob = 0x00; > }else{ > ob = 0xFF; > } > } > finish = true; > } > > int main(void){ > int err; > > std::cout << "xenomai interrupt test" << std::endl; > mlockall(MCL_CURRENT | MCL_FUTURE); > > if (iopl(3)) { > printf("iopl err\n"); > exit(1); > } > > err = rt_task_shadow (&maintask,"maintask",10,0); > std::cout << "task shadow:" << err << std::endl; > > err = rt_timer_set_mode(1000000); > std::cout << "timer set mode:" << err << std::endl; > > > rt_task_spawn(&inttask,"interrupt-task",1024,50,T_JOINABLE,int_task,NULL); > > > rt_task_spawn(&intcreatortask,"interrupt-creator-task",1024,50,T_JOINABLE,int_creator_task,NULL); > > rt_task_join(&intcreatortask); > rt_task_join(&inttask); > > std::cout << "task's finished, exiting" << std::endl; > > return 0; > } > > > _______________________________________________ > Xenomai-help mailing list > [email protected] > https://mail.gna.org/listinfo/xenomai-help -- Philippe. _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
