ts-7000
[Top] [All Lists]

Re: [ts-7000] TS-7300 thread management

To:
Subject: Re: [ts-7000] TS-7300 thread management
From: David Hawkins <>
Date: Mon, 14 Jan 2008 09:38:10 -0800
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/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU