This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: kernel API calls allowed from cyg_user_start()?
- To: Gary Thomas <gthomas at redhat dot com>
- Subject: Re: [ECOS] kernel API calls allowed from cyg_user_start()?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 15 Aug 2001 22:34:29 +0100
- Cc: Grant Edwards <grante at visi dot com>, ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <XFMail.20010815143238.gthomas@redhat.com>
Gary Thomas wrote:
>
> That's what the warning is for. You can't expect to do anything
> which might cause the thread to block, because there is no scheduler
> running, thus no way to get it restarted.
>
> The safest thing to do is only use this routine to set up initial
> threads and then start the kernel. Other things like creating and
> initializing kernel objects (mutexes, etc) are also safe, but not
> using them [in general].
Actually we do take some care to allow people to do things like lock/unlock
mutexes, as quite often you can't help "shared" code needing to do that. Of
course every lock must match an unlock. The kernel is deliberately set up
such that it thinks the current thread is the idle thread in order to do
that (even though it's on a different stack of course) and that the
scheduler is locked.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine