public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: David Luca <davidluca3000@yahoo.com>
To: Jean-Marc.Lopez@faiveleytransport.com,
	  ecos-devel <ecos-devel@sourceware.org>,
	  ecos-discuss <ecos-discuss@sourceware.org>
Subject: Re: Réf. : Twothreads.c without cyg_thread_delay
Date: Fri, 24 Nov 2006 16:08:00 -0000	[thread overview]
Message-ID: <20061124160807.26966.qmail@web38715.mail.mud.yahoo.com> (raw)
In-Reply-To: <OF4BBC549B.0880AA12-ONC1257230.0051C779-C1257230.0051C781@faiveleytransport.com>

Timeslicing is enabled by default in eCos kernel.
This is what I'm interested, to see two threads of
same priority working. Using cyg_thread_delay doesn't
mean much advantage over infinite loops because the
tasks can be very long in working time before it
reaches cyg_thread_delay. Its just a cooperative
multitasking. Timeslicing is the reason I must use
RTOS. If timeslicing is not working, then eCos is not
a true RTOS. Anyone tested timeslicing?

--- Jean-Marc.Lopez@faiveleytransport.com wrote:


---------------------------------
Hi David.
 

Excuse me but with your explanations, it's looks like
you did not manage properly  the threads priorities. 

 

It's just  a problem of Real time OS. 

 

If your 2 threads had the same priority, and Thread_1
never "give the hand" to the kernel, the Thread 2 will
never run. …Except if you configure the timeSlicing
option in your kernel. ( never done at this moment). 

 

By using a cyg_thread_delay function, we said to the 
kernel to stop the current Thread ( Thread 1 ) and to
run the Thread 2 ( or the thread who have the higtest
priority after the Thread1). 

 

By setting the timeslicing option, the kernel will
commute between the 2 threads every x ms ( depending
of your kernel configuration) even if threads have the
same priority. (but not experimented yet). 

 

 
LPZ

 
-----David Luca <davidluca3000@yahoo.com> a écrit :
-----

Pour : ecos-devel <ecos-devel@sourceware.org>,
ecos-discuss <ecos-discuss@sourceware.org>
De : David Luca <davidluca3000@yahoo.com>
Date : 24/11/2006 14:29
Objet : Twothreads.c without cyg_thread_delay





Hello,
Today I started twothreads.c application, but I
replaced printf(not working yet on my platform) with
leds. My question is, without the cyg_thread_delay, is
it possible to run concurrently the two threads?
Because if I comment this function, only one task is
running, I can see that only one led is turn on and
off.
Thank you in advance,
David Luca.



____________________________________________________________________________________

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com







__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

           reply	other threads:[~2006-11-24 16:08 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <OF4BBC549B.0880AA12-ONC1257230.0051C779-C1257230.0051C781@faiveleytransport.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061124160807.26966.qmail@web38715.mail.mud.yahoo.com \
    --to=davidluca3000@yahoo.com \
    --cc=Jean-Marc.Lopez@faiveleytransport.com \
    --cc=ecos-devel@sourceware.org \
    --cc=ecos-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).