예제 #1
0
파일: BRTOS.c 프로젝트: andrecurvello/brtos
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;
}