[ECOS] A few general questions about HAL.

Nick Garnett nickg@cygnus.co.uk
Wed Sep 5 00:09:00 GMT 2001


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



More information about the Ecos-discuss mailing list