This is the mail archive of the ecos-discuss@sources.redhat.com 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]

RE: kernel API calls allowed from cyg_user_start()?



On 15-Aug-2001 Grant Edwards wrote:
> 
> Can somebody point me to a list of what kernel API calls are
> allowed before the scheduler is started (e.g. from inside
> cyg_user_start())?
> 
> Some ones that obviously work involve creating and intializing
> kernel objects.
> 
> One note I found states:
> 
>   CAUTION 
> 
>   Remember that cyg_user_start() is invoked before the
>   scheduler (and frequently the scheduler is invoked as the
>   last step in cyg_user_start() ), so it should not use any
>   kernel services that require the scheduler.
> 
> How do you know which kernel services require the scheduler?  I
> assume that anything that might normally block is in that
> category.

That's what the warning is for.  You can't expect to do anything
which might cause the thread to block, because there is no scheduler
running, thus no way to get it restarted.

The safest thing to do is only use this routine to set up initial
threads and then start the kernel.  Other things like creating and
initializing kernel objects (mutexes, etc) are also safe, but not
using them [in general].


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