This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Scheduler startup question
- From: Michael Jones <mjones at linear dot com>
- To: ecos discuss <ecos-discuss at sourceware dot org>
- Date: Wed, 26 Feb 2014 22:06:31 -0700
- Subject: Scheduler startup question
- Authentication-results: sourceware.org; auth=none
I have a question about proper scheduler locking startup behavior.
The context is I am cleaning up my iMX6 HAL and attempting to make things work without a couple of kernel hacks I added to make it work.
The question has to do with sched_lock. By default this has a value of 1, so during startup the scheduler is locked.
When there is an interrupt, sched_lock is incremented in Vectors.S, and decremented in interrupt_end.
However, I am getting an assert in sync.h which is part of the BSD stack. The assert is because it expects the lock to be zero.
The question is, during the startup process, how does the lock get set to zero after initialization? Is it supposed to stay 1 while hardware is initialized and through all the constructors, etc? Is it cleared by the scheduler somehow? Is the HAL supposed to zero it at some point during startup?
My HAL is part of the ARM hal, so if this is device specific, it is the ARM HAL I am working with.
Mike
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss