Example #1
0
static  void vuart_task_main(task_entry_struct *task_entry_ptr)
{
    ilm_struct current_ilm;

    kal_uint32   my_index;

    kal_get_my_task_index(&my_index);
    stack_set_active_module_id (my_index, MOD_VUART);

    while (1)
    {
        receive_msg_ext_q( task_info_g[task_entry_ptr->task_indx].task_ext_qid,
                           &current_ilm);
        vuart_main(&current_ilm);
        free_ilm(&current_ilm);

    }

}
/*****************************************************************************
 * FUNCTION
 *  ies_task_init
 * DESCRIPTION
 *  image viewer daemon task init function
 * PARAMETERS
 *  *task_indx    [IN]    task index
 * RETURNS
 *  KAL_TRUE init OK
 *****************************************************************************/
static kal_bool ies_task_init(task_indx_type task_indx)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    stack_set_active_module_id(INDX_IES, MOD_IES);

    g_ies_task_context.pJob    = NULL;

    LIST_INIT(&(g_ies_task_context.normal));
    LIST_INIT(&(g_ies_task_context.lowest));

    g_srv_ies_job_mutex = kal_create_mutex("IESJOBMX");
    g_srv_ies_job_event = kal_create_event_group("ies_evt");
   
    return KAL_TRUE;
}
/*****************************************************************************
 * FUNCTION
 *  CalHighTaskMain
 * DESCRIPTION
 *  This function is main function of CAL HIGH task.
 * PARAMETERS
 *  task_entry_ptr      [?]
 * RETURNS
 *  void
 *****************************************************************************/
void CalHighTaskMain(task_entry_struct *pTaskEntry)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    ilm_struct CurrentIlm;
    kal_uint32 CalHighTaskIndex;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    kal_get_my_task_index(&CalHighTaskIndex);

    while (1)
    {
        receive_msg_ext_q_for_stack(task_info_g[CalHighTaskIndex].task_ext_qid, &CurrentIlm);
        stack_set_active_module_id(CalHighTaskIndex, CurrentIlm.dest_mod_id);

        CalHighMsgHandle(&CurrentIlm);

        free_ilm(&CurrentIlm);
    }
} /* CalHighTaskMain() */
Example #4
0
/*****************************************************************************
 * FUNCTION
 *  vcodec_v2_task_main
 * DESCRIPTION
 *  Vcodec task main
 * PARAMETERS
 *  task_entry_ptr      [IN]        task struct pointer
 * RETURNS
 *  void
 *****************************************************************************/
static void vcodec_v2_task_main(task_entry_struct *task_entry_ptr)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    ilm_struct current_ilm;
    kal_uint32 my_index;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    kal_get_my_task_index(&my_index);

    while (1)
    {
        receive_msg_ext_q_for_stack(task_info_g[task_entry_ptr->task_indx].task_ext_qid, &current_ilm);
        stack_set_active_module_id(my_index, current_ilm.dest_mod_id);

        vcodec_v2_main((void*)&current_ilm);

        free_ilm(&current_ilm);
    }

}