Hi Paolo,
> I have a simple multithreaded application (2 threads incrementing a
> counter with a different frequency),
> it runs correctly in my fedora 7 host environment by using SCHED_FIFO as
> scheduling policy.
>
> It doesn't run on TS-7300 (cross compiled with
> arm-unknown-linux-gnu-gcc) running the default 2.4 debian kernel,
> threads run just one time and no more.
> By changing scheduling policy (SCHED_OTHER) threads run all the set
> times but with an unpredictable frequency.
>
> Do someone know why?
I think you'll find that this has more to do with the TS-7300 using
a 2.4 kernel and your FC7 kernel is 2.6.
The Linux kernel has changed its threading model over time, so
that could be an issue.
However, I do have multi-threaded code running on both 2.4 and
2.6 kernel systems without issues.
And if I take a look at what I used ....
// Change to a realtime process
if (realtime) {
ACE_Sched_Params fifo_sched_params(
ACE_SCHED_FIFO,
ACE_Sched_Params::priority_min(ACE_SCHED_FIFO),
ACE_SCOPE_PROCESS);
if (ACE_OS::sched_params(fifo_sched_params) != 0) {
if (errno == EPERM || errno == ENOTSUP) {
ACE_ERROR((LM_ERROR,
"ERROR:\n"
" Real-time threads must be started by root\n"
" or by using sudo privileges.\n"));
return -1;
}
}
}
It looks like I use SCHED_FIFO. The ACE stuff is from the ACE C++
library.
I'd recommend booting a 2.4 kernel on a desktop machine and testing
your code works there first. At that point you'll be able to tell
whether its a kernel issue, or related to the TS-7300.
You could also try a 2.6 kernel on your TS-7300 board.
Cheers,
Dave
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|