This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: A few general questions about HAL.
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] A few general questions about HAL.
- From: Nick Garnett <nickg at cygnus dot co dot uk>
- Date: 11 May 2000 13:16:31 +0100
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Cygnus Solutions, a Red Hat company (Cambridge, UK)
- References: <87puqt71j7.fsf@osv.javad.ru>
Sergei Organov <osv@javad.ru> writes:
> As far as I understand from eCos sources, the HAL_THREAD_SWITCH_CONTEXT is
> always called with scheduler locked, but this is not explicitly guaranteed by
> the documentation. May I rely on this?
In the one place it is called, the scheduler is always locked. No such
requirement is documented since there has been no dependency on the
scheduler lock in this code - that the scheduler should be locked for
other reasons is outside its scope.
However, I think you can reasonably assume that the scheduler will
always be locked.
>
> Is HAL_THREAD_LOAD_CONTEXT called with scheduler locked or unlocked?
>
This will be called with the scheduler locked. The lock is initialized
to one and it is the first thread executing thread_entry() that
unlocks it for the first time.
--
Nick Garnett
Cygnus Solutions, a Red Hat Company
Cambridge, UK