sched/scheduler.c
/**************************************************************************
* Name:
*  sched_get_current_task
*
* Description:
*  Get current runing task.
*
* Return Value:
*  The TCB of the next task or NULL if the scheduler is not initialized.
*
* Assumptions:
*  This function is safe to be called when we have context switching off.
*
*************************************************************************/


Get current runing task.

Return Value:
The TCB of the next task or NULL if the scheduler is not initialized.

This function is safe to be called when we have context switching off.
Get current runing task . Return Value : The TCB of the next task or NULL if the scheduler is not initialized . This function is safe to be called when we have context switching off .
tcb_t *sched_get_current_task(void)
{
  if (g_current_tcb == NULL)
    return NULL;
  return (tcb_t *)container_of(g_current_tcb, tcb_t, next_tcb);
}
tcb_t * sched_get_current_task ( void ) { if ( g_current_tcb == NULL ) return NULL ; return ( tcb_t * ) container_of ( g_current_tcb , tcb_t , next_tcb ) ; }
Name:
sched_get_current_task
Name : sched_get_current_task