Exemple #1
0
void test_init(void)
{
   test_setuptick(NULL, 300000000);

   os_task_create(
      &task_main, OS_CONFIG_PRIOCNT - 1,
      task_main_stack, sizeof(task_main_stack),
      task_main_proc, NULL);
}
Exemple #2
0
void test_init(void)
{
   os_task_create(&task1, 1, task1_stack, sizeof(task1_stack), task1_proc, NULL);
   os_task_create(&task2, 1, task2_stack, sizeof(task2_stack), task2_proc, NULL);

   /* frequent ticks help test race conditions.  The best would be to call tick
    * ISR every instruction, 1ms tick should be optimal */
   test_setuptick(NULL, 1000000);

}
Exemple #3
0
void test_init(void)
{
   uint16_t i;

   os_waitqueue_create(&wq);
   for (i = 0; i < TEST_TASK_CNT; i++) {
      os_task_create(&(task_def[i].task), 1, task_def[i].stack,
         sizeof(task_def[i].stack),
         task_proc, (void*)(&(task_def[i].cnt)));
   }

   /* frequent ticks help test race conditions.  The best would be to call tick
    * ISR every instruction, 1ms tick should be optimal */
   test_setuptick(tick_clbck, 1000000);
}