[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mips64Orion,p4650



There must be something wrong with your _Thread_Dispatch_disable_level
global variable. When I get to _Thread_Enable_Dispatch at the end of
rtems_region_create, my _Thread_Dispatch_disable_level is 2, not 1.
_Thread_Dispatch is not called at that point. The first time
_Thread_Dispatch is called is to dispatch the first initialization task.

> "Alexey S. Fadeyev" wrote:
> 
> Hi all.
> 
> /rtems-4.0.0/c/src/exec/score/src/thread.c
> /*
>  *  No threads should be created before this point!!!
>  *
>  *  At this point all API extensions are in place.  After the call to
>  *  _Thread_Create_idle() _Thread_Executing will be set.
>  *  and _Thread_Heir are not set yet.
>  */
> 
> _Thread_Create_idle()
> 
> But before this funtcion we call Thread_Dispatch from
> bsp_pretasking_hook()
>  bsp_libc_init()
>   RTEMS_Malloc_Initialize()
>    rtems_region_create()
>       ...
>     Thread_Dispatch()
> 
> And Thread_Dispatch() use global pointers _Thread_Heir,
> _Thread_Executing,
> which are not initialize yet. If we had physical memory starts from
> zero -
> everything is allright. But if it is not so - we recieve
> BusErrorExeption.
> 
> It's look like a bug,is't it?
> 
> Regards
> Alexey

-- 
Charles-Antoine Gauthier
Research Officer
Software Engineering Group
Institute for Information Technology
National Research Council of Canada
Ottawa, ON, Canada
K1A 0R6