public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re: about elix
  2001-05-25  1:17 [ECOS] Re: about elix Fano Ramparany
@ 2001-05-25  0:54 ` wangwei
  2001-05-25  2:29   ` Fano Ramparany
  2001-05-25  3:05   ` Hugo Tyson
  0 siblings, 2 replies; 5+ messages in thread
From: wangwei @ 2001-05-25  0:54 UTC (permalink / raw)
  To: Fano.Ramparany; +Cc: eCos Disuss

I just mean create a thread in the body of anther thread , and the thread
can use dynamic memory as its
stack , when the thread ends, the memory of its stack can be released .
I want to know if ecos support this ?
thinks!
----- Original Message -----
From: "Fano Ramparany" <Fano.Ramparany@rd.francetelecom.fr>
To: <wangw@start.com.cn>
Cc: "eCos Disuss" <ecos-discuss@sourceware.cygnus.com>
Sent: Friday, May 25, 2001 3:36 PM
Subject: Re: about elix


> If by "dynamic creating thread" you mean creating a thread in the body
> of another thread entry, then you don't need elix.
> eCos supports the following:
>
> void entry1(...)
> {
>     ...
>     cyg_thread_create (...,thread_handle2,...);
>     cyg_thread_resume (thread_handle2);
>     ...
> }
>
> void cyg_user_start ()
> {
>     ...
>     cyg_thread_create (...,entry1,...,thread_handle1,...);
>     cyg_thread_resume (thread_handle1);
>     ...
> }
>
>
> >Subject:    about elix
> >Date:  Thu, 24 May 2001 14:30:18 +0800
> >From: "wangwei" <wangw@start.com.cn>
> >     To:   <ecos-discuss@sources.redhat.com>
> > Hi,all
> >I want some application with dynamic creating thread . So I must use
> elix in
> >ecos .
> >Does anybody tell me if elix in ecos is stable?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] Re: about elix
@ 2001-05-25  1:17 Fano Ramparany
  2001-05-25  0:54 ` wangwei
  0 siblings, 1 reply; 5+ messages in thread
From: Fano Ramparany @ 2001-05-25  1:17 UTC (permalink / raw)
  To: wangw; +Cc: eCos Disuss

If by "dynamic creating thread" you mean creating a thread in the body
of another thread entry, then you don't need elix.
eCos supports the following:

void entry1(...)
{
    ...
    cyg_thread_create (...,thread_handle2,...);
    cyg_thread_resume (thread_handle2);
    ...
}

void cyg_user_start ()
{
    ...
    cyg_thread_create (...,entry1,...,thread_handle1,...);
    cyg_thread_resume (thread_handle1);
    ...
}


>Subject:    about elix
>Date:  Thu, 24 May 2001 14:30:18 +0800
>From: "wangwei" <wangw@start.com.cn>
>     To:   <ecos-discuss@sources.redhat.com>
> Hi,all
>I want some application with dynamic creating thread . So I must use
elix in
>ecos .
>Does anybody tell me if elix in ecos is stable?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] Re: about elix
  2001-05-25  0:54 ` wangwei
@ 2001-05-25  2:29   ` Fano Ramparany
  2001-05-25  3:05   ` Hugo Tyson
  1 sibling, 0 replies; 5+ messages in thread
From: Fano Ramparany @ 2001-05-25  2:29 UTC (permalink / raw)
  To: wangwei; +Cc: eCos Disuss

wangwei wrote:

> I just mean create a thread in the body of anther thread , and the thread
> can use dynamic memory as its
> stack , when the thread ends, the memory of its stack can be released .
> I want to know if ecos support this ?

In the applications I've developped so far thread stacks are preallocated
array variables. Embedded applications generally don't use dynamic memory
management (malloc). eCos provides an alternative mechanism called "memory
pool"
which might fit your needs.

Fano

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Re: about elix
  2001-05-25  0:54 ` wangwei
  2001-05-25  2:29   ` Fano Ramparany
@ 2001-05-25  3:05   ` Hugo Tyson
  2001-05-25  3:32     ` wangwei
  1 sibling, 1 reply; 5+ messages in thread
From: Hugo Tyson @ 2001-05-25  3:05 UTC (permalink / raw)
  To: ecos-discuss

"wangwei" <wangw@start.com.cn> writes:

> I just mean create a thread in the body of anther thread , and the thread
> can use dynamic memory as its stack , when the thread ends, the memory of
> its stack can be released .

You must write the code to allocate the dynamic memory when you create the
thread and its stack, and you must write the code to free the dynamic
memory when the thread ends (in a different thread).

> I want to know if ecos support this ?

But all the calls are there, and there is nothing special about the memory
that is used for a thread object and its stack; you can allocate and free
it just like any other memory.

	- Huge


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Re: about elix
  2001-05-25  3:05   ` Hugo Tyson
@ 2001-05-25  3:32     ` wangwei
  0 siblings, 0 replies; 5+ messages in thread
From: wangwei @ 2001-05-25  3:32 UTC (permalink / raw)
  To: ecos-discuss, Hugo Tyson

Thanks.
I have realized it .The method is ok.
----- Original Message -----
From: "Hugo Tyson" <hmt@redhat.com>
To: <ecos-discuss@sources.redhat.com>
Sent: Friday, May 25, 2001 6:04 PM
Subject: Re: [ECOS] Re: about elix


>
> "wangwei" <wangw@start.com.cn> writes:
>
> > I just mean create a thread in the body of anther thread , and the
thread
> > can use dynamic memory as its stack , when the thread ends, the memory
of
> > its stack can be released .
>
> You must write the code to allocate the dynamic memory when you create the
> thread and its stack, and you must write the code to free the dynamic
> memory when the thread ends (in a different thread).
>
> > I want to know if ecos support this ?
>
> But all the calls are there, and there is nothing special about the memory
> that is used for a thread object and its stack; you can allocate and free
> it just like any other memory.
>
> - Huge
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-05-25  3:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-25  1:17 [ECOS] Re: about elix Fano Ramparany
2001-05-25  0:54 ` wangwei
2001-05-25  2:29   ` Fano Ramparany
2001-05-25  3:05   ` Hugo Tyson
2001-05-25  3:32     ` wangwei

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).