This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Re: How to know if scheduler has started?


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


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