예제 #1
0
파일: Main.c 프로젝트: bluelife85/rt-boss
int bb_task(void *p_arg)
{
  int bb_count = 0;
  
  PRINTF("[%s TASK] Init \n", Boss_self()->name);
  
  for(;;)
  {
    Boss_sleep(10 * 1000);  /* 10 Sec */
    
    #ifdef _BOSS_SPY_
    Boss_spy_report();
    #endif
    
    #ifdef _BOSS_MEM_INFO_
    Boss_mem_info_report();
    #endif

    PRINTF("*BB_TASK count = %d \n", ++bb_count);
    
    if(10 <= bb_count)
    {
      break;
    }
  }

  PRINTF("[%s TASK] Exit \n", Boss_self()->name);
  
  return 0;       // 테스크 종료
}
예제 #2
0
/*===============================================
    A A _ M A I N
-----------------------------------------------*/
void aa_main(void *p_arg)
{  
  int aa_count = 0;
  
  PRINTF("[%s TASK] Init \n", Boss_self()->name);
  
  for(;;)
  {    
    Boss_sleep(500);  /* 500ms */
    PRINTF(" AA_TASK count = %d \n", ++aa_count);
  }
}
예제 #3
0
int aa_task(void *p_arg)
{
    int aa_count = 0;

    PRINTF("[%s TASK] Init \n", Boss_self()->name);

    PRINTF("flag grp Create & Init\n");
    ex_flag_id = Boss_flag_grp_create();

    Boss_sleep(100); // TASK init wait

    for(;;)
    {
        Boss_sleep(2000);

        ++aa_count;

        PRINTF("\n[%s] (%d) Boss_flag_send( FLAG_01 )\n", Boss_self()->name, aa_count);
        Boss_flag_send(ex_flag_id, FLAG_01);
    }

    return 0;       // 테스크 종료
}
예제 #4
0
/*===============================================
    B B _ M A I N
-----------------------------------------------*/
void bb_main(void *p_arg)
{
  int bb_count = 0;
  
  PRINTF("[%s TASK] Init \n", Boss_self()->name);
  
  for(;;)
  {
    Boss_sleep(10 * 1000);  /* 10 Sec */
    PRINTF("BB_TASK count = %d \n", ++bb_count);
        
    #ifdef _BOSS_SPY_
    Boss_spy_report();
    #endif
    
    #ifdef _BOSS_MEM_INFO_
    Boss_mem_info_report();
    #endif
  }
}
예제 #5
0
파일: Main.c 프로젝트: bluelife85/rt-boss
int aa_task(void *p_arg)
{  
  int aa_count = 0;
  
  PRINTF("[%s TASK] Init \n", Boss_self()->name);
  
  for(;;)
  {
    Boss_sleep(500);  /* 500ms */
    PRINTF("    AA_TASK count = %d \n", ++aa_count);

    if(100 < aa_count)
    {
      break;
    }
  }
  
  PRINTF("[%s TASK] Exit \n", Boss_self()->name);
  
  return 0;       // 테스크 종료
}
예제 #6
0
int cx_task(void *p_arg)
{
    PRINTF("[%s TASK] Init \n", Boss_self()->name);
    Boss_sleep(100); // TASK init wait

    for(;;)
    {
        boss_flags_t flags = Boss_flag_wait(ex_flag_id, FLAG_01,
                                            _FLAG_OPT_OR + _FLAG_OPT_CONSUME, 20*1000/*20초*/);
        if(flags != 0)
        {
            PRINTF("[%s] Boss_flag_wait(OR + CONSUME) flags = 0x%04x\n",
                   Boss_self()->name, flags);
        }
        else
        {
            PRINTF("[%s] Timeout Flag Wait\n", Boss_self()->name);
        }
    }

    return 0;       // 테스크 종료
}