This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: POSIX problems during ARM simulations


Chip Boling wrote:
I have been having some troubles with getting twothreads.c running when
POSIX has been added to the list of available packages.  I am running on
CYGWIN and have tried it under both SID and the Insight simulator with the
same results.  When I run, all the output I see is:

   Entering twothreads' main() function
   Beginning execution; thread data is 1
   Beginning execution; thread data is 2

I don't see this with the synthetic linux target. Also the thread data at the start should be 0 and 1, not 1 and 2. Hmm.


If I remove the POSIX package from the application and rebuild eCos and
twothreads, I can successfully run the example and get the expected output.
Does anyone know what I may be doing wrong?   It seems everytime I break, I
am sitting in idle_thread_main().

One obvious thing is that you are using a simulator target which is faithfully looping around until the right number of simulated time has passed (which will be much longer than real time). Try reducing the delays by say a factor of 10.


I have also modified twothreads.c to use straight POSIX calls and start any
support threads from main and this has not helped. A stripped down copy of
this is included below if anyone wants to test it out or in the future, use
it as the base for learning how to (or how not to) do POSIX on eCos. I have
also reduced the nanosecond values down to just a single nanosecond in case
there is a significant simulation delay and this had no effect.

This also works fine for me on the synthetic linux target.


Out of interest the mutex protection for the C library comment is something I should really get rid of (but have never gotten round to). That comment exists from eCos version 0.3!


> You can > also go to ftp://24.214.255.46/outgoing to get a copy of this file as well > as the eCos 'ecc' file that I am trying to use.

I would if the site was up! Instead you can run:
  bash$ ecosconfig export foo.ecm
and send foo.ecm to this list. That file would be just as useful.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]