Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The table below shows the difference in API for task-management services.

Panel
titleTask Management API


µC/OS-II (os_task.c)

µC/OS-III (os_task.c)

Note

INT8U
OSTaskChangePrio(
    INT8U        oldprio,
    INT8U        newprio);
void
OSTaskChangePrio(
    OS_TCB       *p_tcb,
    OS_PRIO       prio,
    OS_ERR       *p_err);
(1)
INT8U
OSTaskCreate(
    void       (*task)(void *p_arg),
    void        *p_arg,
    OS_STK      *ptos,
    INT8U        prio);
void
OSTaskCreate(
    OS_TCB       *p_tcb,
    CPU_CHAR     *p_name,
    OS_TASK_PTR  *p_task,
    void         *p_arg,
    OS_PRIO       prio,
    CPU_STK      *p_stk_base,
    CPU_STK_SIZE  stk_limit,
    CPU_STK_SIZE  stk_size,
    OS_MSG_QTY    q_size,
    OS_TICK       time_quanta,
    void         *p_ext,
    OS_OPT        opt,
    OS_ERR       *p_err);
(2)  
INT8U
OSTaskCreateExt(
    void       (*task)(void *p_arg),
    void        *p_arg,
    OS_STK      *ptos,
    INT8U        prio,
    INT16U       id,
    OS_STK      *pbos,
    INT32U       stk_size,
    void        *pext,
    INT16U       opt);
void
OSTaskCreate(
    OS_TCB       *p_tcb,
    CPU_CHAR     *p_name,
    OS_TASK_PTR  *p_task,
    void         *p_arg,
    OS_PRIO       prio,
    CPU_STK      *p_stk_base,
    CPU_STK_SIZE  stk_limit,
    CPU_STK_SIZE  stk_size,
    OS_MSG_QTY    q_size,
    OS_TICK       time_quanta,
    void         *p_ext,
    OS_OPT        opt,
    OS_ERR       *p_err);
(2)
INT8U 
OSTaskDel(
    INT8U        prio);
void
OSTaskDel(
    OS_TCB       *p_tcb,
    OS_ERR       *p_err);

INT8U
OSTaskDelReq(
    INT8U        prio);


INT8U
OSTaskNameGet(
    INT8U        prio,
    INT8U      **pname,
    INT8U       *perr);


void
OSTaskNameSet(
    INT8U        prio,
    INT8U       *pname,
    INT8U       *perr);

(3)

OS_MSG_QTY
OSTaskQFlush(
    OS_TCB       *p_tcb,
    OS_ERR       *p_err);
(4)

void *
OSTaskQPend(
    OS_TICK      timeout,
    OS_OPT       opt,
    OS_MSG_SIZE *p_msg_size,
    CPU_TS      *p_ts,
    OS_ERR      *p_err);
(4)

CPU_BOOLEAN
OSTaskQPendAbort(
    OS_TCB      *p_tcb,
    OS_OPT       opt,
    OS_ERR      *p_err);
(4)

void
OSTaskQPost(
    OS_TCB      *p_tcb,
    void        *p_void,
    OS_MSG_SIZE  msg_size,
    OS_OPT       opt,
    OS_ERR      *p_err);
(4)
INT32U
OSTaskRegGet(
    INT8U        prio,
    INT8U        id,
    INT8U       *perr);
OS_REG
OSTaskRegGet(
    OS_TCB      *p_tcb,
    OS_REG_ID    id,
    OS_ERR      *p_err);

void
OSTaskRegSet(
    INT8U        prio,
    INT8U        id,
    INT32U       value,
    INT8U       *perr);
void
OSTaskRegGet(
    OS_TCB      *p_tcb,
    OS_REG_ID    id,
    OS_REG       value,
    OS_ERR      *p_err);

INT8U
OSTaskResume(
    INT8U        prio);
void
OSTaskResume(
    OS_TCB      *p_tcb,
    OS_ERR      *p_err);


OS_SEM_CTR
OSTaskSemPend(
    OS_TICK      timeout,
    OS_OPT       opt,
    CPU_TS      *p_ts,
    OS_ERR      *p_err);
(5)

CPU_BOOLEAN
OSTaskSemPendAbort(
    OS_TCB      *p_tcb,
    OS_OPT       opt,
    OS_ERR      *p_err);
(5)

CPU_BOOLEAN
OSTaskSemPendAbort(
    OS_TCB      *p_tcb,
    OS_OPT       opt,
    OS_ERR      *p_err);
(5)

OS_SEM_CTR
OSTaskSemPost(
    OS_TCB      *p_tcb,
    OS_OPT       opt,
    OS_ERR      *p_err);
(5)

OS_SEM_CTR
OSTaskSemSet(
    OS_TCB      *p_tcb,
    OS_SEM_CTR   cnt,
    OS_ERR      *p_err);
(5)
INT8U
OSTaskSuspend(
    INT8U        prio);
void
OSTaskSuspend(
    OS_TCB       *p_tcb,
    OS_ERR       *p_err);

INT8U
OSTaskStkChk(
    INT8U        prio,
    OS_STK_DATA *p_stk_data);
void
OSTaskStkChk(
    OS_TCB       *p_tcb,
    CPU_STK_SIZE *p_free,
    CPU_STK_SIZE *p_used,
    OS_ERR       *p_err);
(6)

void
OSTaskTimeQuantaSet(
    OS_TCB      *p_tcb,
    OS_TICK      time_quanta,
    OS_ERR      *p_err);
(7)
INT8U
OSTaskQuery(
    INT8U        prio,
    OS_TCB      *p_task_data);

(8)


...