示例#1
0
INT8U BRTOSStart(void)
{
 #if (TASK_WITH_PARAMETERS == 1)
  if (InstallTask(&Idle, "Idle Task", IDLE_STACK_SIZE, 0, (void*)NULL, NULL) != OK)
 #else
  if (InstallTask(&Idle, "Idle Task", IDLE_STACK_SIZE, 0, NULL) != OK)
 #endif
  {
    return NO_MEMORY;
  };

  currentTask = OSSchedule();
  SPvalue = ContextTask[currentTask].StackPoint;
  BTOSStartFirstTask();
  return OK;
}
示例#2
0
文件: BRTOS.c 项目: brtos/brtos
uint8_t BRTOSStart(void)
{
 #if (TASK_WITH_PARAMETERS == 1)
  if (InstallTask(&Idle, "Idle Task", IDLE_STACK_SIZE, 0, (void*)NULL, NULL) != OK)
 #else
  if (InstallTask(&Idle, "Idle Task", IDLE_STACK_SIZE, 0, NULL) != OK)
 #endif
  {
    return NO_MEMORY;
  };

#if (COMPUTES_TASK_LOAD == 1)
  OSConfigureTimerForRuntimeStats();
#endif

  currentTask = OSSchedule();
  SPvalue = ContextTask[currentTask].StackPoint;
  BTOSStartFirstTask();
  return OK;
}