Miscellaneous API Changes

The table below shows the difference in API for miscellaneous services.

Miscellaneous API
µC/OS-II (os_core.c)µC/OS-III (os_core.c)Note
INT8U
OSEventNameGet(
    OS_EVENT   *pevent,
    INT8U     **pname,
    INT8U      *perr);

(1)

void
OSEventNameSet(
    OS_EVENT   *pevent,
    INT8U      *pname,
    INT8U      *perr);

(1)
INT16U
OSEventPendMulti(
    OS_EVENT  **pevent_pend,
    OS_EVENT  **pevent_rdy,
    void      **pmsgs_rdy,
    INT32U      timeout,
    INT8U      *perr);

(2)
void
OSInit(void)
void
OSInit(
    OS_ERR        *p_err);
(3)
void
OSIntEnter(void)
void
OSIntEnter(void);

void
OSIntExit(void)
void
OSIntExit(void)


void
OSSched(void);

void
OSSchedLock(void)
void
OSSchedLock(
    OS_ERR        *p_err);
(4)

void
OSSchedRoundRobinCfg(
    CPU_BOOLEAN    en,
    OS_TICK        dflt_time_quanta,
    OS_ERR        *p_err);

(5)



void
OSSchedRoundRobinYield(
    OS_ERR        *p_err);
(6)
void
OSSchedUnlock(void)
void
OSSchedUnlock(
    OS_ERR        *p_err);
(7)
void
OSStart(void)
void
OSStart(void);

void
OSStatInit(void)
void
OSStatTaskCPUUsageInit(
    OS_ERR        *p_err);
(8)
INT16U
OSVersion(void)
CPU_INT16U
OSVersion(
    OS_ERR        *p_err);
(9)

(1) Objects in µC/OS-III are named when they are created and these functions are not required in µC/OS-III.

(2) Multipend no longer exist in µC/OS-III.

(3) µC/OS-III returns an error code for this function. Initialization is successful if OS_ERR_NONE is received from OSInit(). In µC/OS-II, there is no way of detecting an error in the configuration that caused OSInit() to fail.

(4) An error code is returned in µC/OS-III for this function.

(5) Enable or disable µC/OS-III’s round-robin scheduling at run time, as well as change the default time quanta.

(6) A task that completes its work before its time quanta expires may yield the CPU to another task at the same priority.

(7) An error code is returned in µC/OS-III for this function.

(8) Note the change in name for the function that computes the “capacity” of the CPU for the purpose of computing CPU usage at run-time.

(9) An error code is returned in µC/OS-III for this function.