This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Scheduler startup question
- From: Lambrecht Jürgen <J dot Lambrecht at TELEVIC dot com>
- To: Michael Jones <mjones at linear dot com>, ecos discuss <ecos-discuss at sourceware dot org>
- Date: Thu, 27 Feb 2014 07:40:05 +0100
- Subject: Re: Scheduler startup question
- Authentication-results: sourceware.org; auth=none
- Reply-to: Lambrecht Jürgen <J dot Lambrecht at TELEVIC dot com>
As far as I know the scheduler is started after cyg_user_start(), used by your application to initialize everything. Do you use cyg_user_start?
Verzonden vanaf Samsung Mobile
-------- Oorspronkelijk bericht --------
Van: Michael Jones <mjones@linear.com>
Datum:
Aan: ecos discuss <ecos-discuss@sourceware.org>
Onderwerp: [ECOS] Scheduler startup question
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
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss