This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to know if scheduler has started?
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Sat, 2 Nov 2013 16:25:32 +0000 (UTC)
- Subject: Re: How to know if scheduler has started?
- Authentication-results: sourceware.org; auth=none
- References: <l4u08n$cap$1 at ger dot gmane dot org> <5273DF08 dot 2000708 at calivar dot com>
On 2013-11-01, Nick Garnett <nickg@calivar.com> wrote:
>
>> OTOH, are you are allowed to lock/unlock mutexes from initialization
>> code? Maybe I'm misremembering, but I thought that was forbidden?
>
> You are allowed to lock/unlock a mutex during initialization. That is
> why the idle thread is set current throughout the init code, and why the
> trick you mention above will work.
Except the trick I mentioned above does _not_ work when called from
device driver intialization code. I haven't tracked down which of the
two calls fails in that case, but one of them causes a segfault when
called from driver init code (but works fine when called from
cyg_user_start()).
--
Grant
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss