This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: THread creation
- To: Paleologos Spanos <paleolog at ee dot ucla dot edu>
- Subject: Re: [ECOS] THread creation
- From: Jesper Skov <jskov at cambridge dot redhat dot com>
- Date: 11 Apr 2001 08:35:19 +0200
- Cc: ecos-discuss at sources dot redhat dot com
- References: <Pine.GSO.4.10.10104101441360.11666-100000@sierra.ee.ucla.edu>
>>>>> "Paleologos" == Paleologos Spanos <paleolog@ee.ucla.edu> writes:
Paleologos> HI,I have a question concerning the creation of threads
Paleologos> in eCos.THe reference manual says that first I have to
Paleologos> create the threads and then starts the scheduler and never
Paleologos> returns.Does it mean that I can not create new threads
Paleologos> after the scheduler starts ? How can I create dynamically
Paleologos> new threads after the scheduler starts?
No, it means you cannot create new threads from the function where you
start the scheduler - it runs in a single-thread environment, if you
will, which is replaced by the scheduler system letting only
registered threads run.
To create new threads on the fly, create them from other threads.
For an example, see something like the tm_basic test. I'm pretty sure
it does something like this.
Jesper