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

Current task



Manuel Coutinho wrote:
> Hi 
>
> You can access the running task by the global variable:
>
> extern Thread_Control *_Thread_Executing;
>   

Correct and a couple of other interesting variables:

_Thread_Heir points to the highest priority ready thread
which may or may not be the same as the executing one.

_Thread_Allocated_FP points to the thread whose FP
context is currently in the FPU.  Again, this might not
be the same as _Thread_Executing.

--joel
> Regards
> Manuel Coutinho
>
>   
>> -----Original Message-----
>> From: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org]
>> On Behalf Of Leon Pollak
>> Sent: Thursday, November 15, 2007 10:19 AM
>> To: rtems-users at rtems.org
>> Subject: Current task
>>
>> Hello, all.
>>
>> Does somebody know how can I define which task is running now?
>> When I break into running program and and do rtems_tasks gdb macro I can
>> see
>> several tasks in READY state, but how can i know which of them is
>> currently
>> executing?
>>
>> Thanks.
>> --
>> Leon
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.com
>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>     
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>