Hi,
I'm in the process of upgrading my Blackfin uclinux dist base from 2009R1.1 to
2010R1. This also includes a kernel and Xenomai upgrade.
The kernel is now 2.6.34 with I-pipe 1.14.02. With Xenomai 2.5.3, my application told me
"Xenomai: User-space support anterior to 2.5.2 detected" on startup. I looked
into newer Xenomai and found that there might have been related code changes, so I tried
2.5.5.2 (and also upgraded to I-pipe 1.15-01, but that doesn't seem to make a difference).
Now with 2.5.5.2, the warning when starting the application is gone, but I
still get one when killing the application using SIGINT for the first time. The
attached small example allows me to reliably reproduce the problem (please
inform me if attachment didn't get through, it's only 30 lines).
When starting it after system reboot and then killing it with Ctrl-C after a
few seconds, the warning is printed:
/ # /tmp/try
press ctrl-c to stop
press ctrl-c to stop
press ctrl-c to stop
^CXenomai: User-space support anterior to 2.5.2 detected, may corrupt memory
upon
thread termination. Upgrade is recommended
/ #
The warning doesn't appear when starting and killing "try" a the second time.
I also experience some other problems with debugging, console output
duplication and (probably) memory fragmentation, maybe they're related but I
have not been able to reproduce them with a small example yet.
Thanks in advance for any hints in advance!
Kolja
/* Compile with gcc-4.3.5 (Blackfin toolchain 2010R1-RC4)
bfin-linux-uclibc-gcc \
-I/opt/uClinux/blackfin-linux-dist/staging/usr/include \
-g -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -o try.gdb try.c \
-L/opt/uClinux/blackfin-linux-dist/staging/usr/lib -lxenomai -lnative -lpthread -lrt
*/
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/mman.h>
#include <native/task.h>
static int quit;
void sighandler(int sig)
{
quit++;
}
int main ()
{
quit = 0;
signal(SIGINT, sighandler);
int r;
RT_TASK maintask;
mlockall(MCL_CURRENT|MCL_FUTURE);
r = rt_task_shadow(&maintask, "maintask", 3, 0);
while (quit==0)
{
printf("press ctrl-c to stop\n");
sleep(1);
}
return r;
}
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help