AnsweredAssumed Answered

OSA_TaskCreate MQX-BUG(?)

Question asked by Ole Asbjorn Fadum on Apr 14, 2015
Latest reply on Nov 2, 2015 by Ole Asbjorn Fadum

Hi,

 

From what I could see, the 'name' parameter is forgotten when create an MQX task (I've added it inside the #if1 / #endif).

File: C:\Freescale\KSDK_1.1.0\platform\osa\src\fsl_os_abstraction_mqx.c

 

osa_status_t OSA_TaskCreate(task_t      task,
                     uint8_t    *name,
                     uint16_t    stackSize,
                     task_stack_t   *stackMem,
                     uint16_t    priority,
                     task_param_tparam,
                     bool        usesFloat,
                     task_handler_t *handler)

{

taskinit_t task_parameters = {

#if 1

    .name = (char *)name,
#endif  
    .exec   = task,
    .stacksize  = stackSize,
    .stackaddr  = stackSize == 0 ? NULL : stackMem,
    .priority   = PRIORITY_OSA_TO_RTOS(priority),
    .exec_param = (void *)param,
};

 

*handler = create_task(&task_parameters);

 

if (MQX_NULL_TASK_ID != *handler)
{
    return kStatus_OSA_Success;
}
else
{
    return kStatus_OSA_Error;
}

}

Outcomes