This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Is main a thread
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Robert Brusa <bob dot brusa at gmail dot com>
- Cc: MailingList: ecos-discuss <ecos-discuss at ecos dot sourceware dot org>;
- Date: Wed, 5 Nov 2008 12:42:04 +0100
- Subject: Re: [ECOS] Is main a thread
- References: <op.uj4091eskeg3uf@localhost>
On Wed, Nov 05, 2008 at 09:45:27AM +0100, Robert Brusa wrote:
> Hi
> the function main has a somewhat special role, but little can be found
> about it in eCOSs documentation. I found the statement, that some
> libraries are initialized when main is called. Further: I have written
> small test-apps for my modules and normally these apps do not include a
> main, but only one (or several) threads. Then I built an app that
> included a main only, but no threads. Both approaches work, but can I do
> everything that is allowed in threads also in main? Or in other words:
>
> 1) Is main just a thread or is it kind of the idle task of eCOS?
main is a full eCos thread. It is not however a full POSIX thread, as
far as i remember.
> 2) Where are its stack-resource assigned and how much.
CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE
CYGNUM_LIBC_MAIN_THREAD_PRIORITY
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss