/*********************************************************************
*
*       SYSVIEW_SendTaskInfo()
*
*  Function description
*    Record task information.
*/
void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) {
  SEGGER_SYSVIEW_TASKINFO TaskInfo;

  memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code
  TaskInfo.TaskID     = TaskID;
  TaskInfo.sName      = sName;
  TaskInfo.Prio       = Prio;
  TaskInfo.StackBase  = StackBase;
  TaskInfo.StackSize  = StackSize;
  SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo);
}
Exemplo n.º 2
0
/********************************************************************* 
*
*       SYSVIEW_SendTaskInfo()
*
*  Function description
*    Record task information.
*/
void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) {
  SEGGER_SYSVIEW_TASKINFO TaskInfo;

  taskENTER_CRITICAL();                   // No scheduling to make sure the task list does not change while we are transmitting it
  memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code
  TaskInfo.TaskID     = TaskID;
  TaskInfo.sName      = sName;  
  TaskInfo.Prio       = Prio;   
  TaskInfo.StackBase  = StackBase;
  TaskInfo.StackSize  = StackSize;
  SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo);
  taskEXIT_CRITICAL ();                   // No scheduling to make sure the task list does not change while we are transmitting it
}
Exemplo n.º 3
0
static void _cbSendTaskInfo(const OS_TASK* pTask) {
    SEGGER_SYSVIEW_TASKINFO Info;

    OS_EnterRegion();         // No scheduling to make sure the task list does not change while we are transmitting it
    memset(&Info, 0, sizeof(Info));     // Fill all elements with 0 to allow extending the structure in future version without breaking the code
    Info.TaskID = (U32)pTask;
#if OS_TRACKNAME
    Info.sName = pTask->Name;
#endif
    Info.Prio = pTask->Priority;
#if OS_CHECKSTACK
    Info.StackBase = (U32)pTask->pStackBot;
    Info.StackSize = pTask->StackSize;
#endif
    SEGGER_SYSVIEW_SendTaskInfo(&Info);
    OS_LeaveRegion();         // No scheduling to make sure the task list does not change while we are transmitting it
}