This is the mail archive of the ecos-discuss@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]

Re: THread creation


>>>>> "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


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