...
Anchor |
---|
1080022 | 1080022 | Mutual Exclusion Semaphores Anchor |
---|
1080023 | 1080023 | Table C-11 The table below shows the difference in API for mutual exclusion semaphore management.
anchor...
HTML Table |
---|
summary |
---|
class | Plain_Table |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
Anchor |
---|
1089777 | 1089777title | Mutual Exclusion Semaphores API |
---|
|
td Anchor |
---|
| 1089779 | 1089779 | td Anchor |
---|
1089781 | 1089781 | tr1089789 | OSMutexAccept( Anchor |
---|
1089795 | 1089795 | OS_EVENT *pevent, Anchor |
---|
1089801 | 1089801 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1089785 | 1089785 | Table Cell (td) |
---|
|
Anchor |
---|
1089811 | 1089811 | (1) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1089813 | 1089813 | OS_EVENT * Anchor |
---|
1089819 | 1089819 | OSMutexCreate( Anchor |
---|
1089825 | 1089825 | INT8U prio, Anchor |
---|
1089831 | 1089831 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1090203 | 1090203 | void Anchor |
---|
1090204 | 1090204 | OSMutexCreate( Anchor |
---|
1090205 | 1090205 | OS_MUTEX *p_mutex, Anchor |
---|
1090206 | 1090206 | CPU_CHAR *p_name, Anchor |
---|
1090207 | 1090207 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1090209 | 1090209 | (2) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1089873 | 1089873 | OS_EVENT * Anchor |
---|
1089879 | 1089879 | OSMutexDel( Anchor |
---|
1089885 | 1089885 | OS_EVENT *pevent, Anchor |
---|
1089891 | 1089891 | INT8U opt, Anchor |
---|
1089897 | 1089897 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1089905 | 1089905 | void Anchor |
---|
1090238 | 1090238 | OSMutexDel( Anchor |
---|
1090239 | 1090239 | OS_MUTEX *p_mutex, Anchor |
---|
1090240 | 1090240 | OS_OPT opt, Anchor |
---|
1090230 | 1090230 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1089877 | 1089877 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1089939 | 1089939 | void Anchor |
---|
1089945 | 1089945 | OSMutexPend( Anchor |
---|
1089951 | 1089951 | OS_EVENT *pevent, Anchor |
---|
1089957 | 1089957 | INT32U timeout, Anchor |
---|
1089963 | 1089963 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1090272 | 1090272 | void Anchor |
---|
1090273 | 1090273 | OSMutexPend( Anchor |
---|
1090274 | 1090274 | OS_MUTEX *p_mutex, Anchor |
---|
1090275 | 1090275 | OS_TICK timeout, Anchor |
---|
1090276 | 1090276 | OS_OPT opt, Anchor |
---|
1090277 | 1090277 | CPU_TS *p_ts, Anchor |
---|
1090278 | 1090278 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1090280 | 1090280 | (3) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
Anchor |
---|
1090017 | 1090017 | Table Cell (td) |
---|
Anchor |
---|
1090019 | 1090019 | OS_OBJ_QTY Anchor |
---|
1090311 | 1090311 | OSMutexPendAbort( Anchor |
---|
1090312 | 1090312 | OS_MUTEX *p_mutex, Anchor |
---|
1090313 | 1090313 | OS_OPT opt, Anchor |
---|
1090314 | 1090314 | OS_ERR *p_err); Table Cell (td) |
---|
Anchor |
---|
1090021 | 1090021 | Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1090053 | 1090053 | INT8U Anchor |
---|
1090059 | 1090059 | OSMutexPost( Anchor |
---|
1090065 | 1090065 | OS_EVENT *pevent); Table Cell (td) |
---|
|
Anchor |
---|
1090073 | 1090073 | void Anchor |
---|
1090354 | 1090354 | OSMutexPost( Anchor |
---|
1090355 | 1090355 | OS_MUTEX *p_mutex, Anchor |
---|
1090356 | 1090356 | OS_OPT opt, Anchor |
---|
1090346 | 1090346 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1090057 | 1090057 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1090107 | 1090107 | INT8U Anchor |
---|
1090113 | 1090113 | OSMutexQuery( Anchor |
---|
1090119 | 1090119 | OS_EVENT *pevent, Anchor |
---|
1090125 | 1090125 | OS_MUTEX_DATA Table Cell (td) |
---|
|
Anchor |
---|
1089783 | 1089783 | BOOLEAN Anchor |
---|
1089789 | rowspan | BOOLEAN
OSMutexAccept(
OS_EVENT *pevent,
INT8U *perr); |
| (1) |
OS_EVENT *
OSMutexCreate(
INT8U prio,
INT8U *perr); | void
OSMutexCreate(
OS_MUTEX *p_mutex,
CPU_CHAR *p_name,
OS_ERR *p_err); | (2) |
OS_EVENT *
OSMutexDel(
OS_EVENT *pevent,
INT8U opt,
INT8U *perr); | void
OSMutexDel(
OS_MUTEX *p_mutex,
OS_OPT opt,
OS_ERR *p_err); |
|
void
OSMutexPend(
OS_EVENT *pevent,
INT32U timeout,
INT8U *perr); | void
OSMutexPend(
OS_MUTEX *p_mutex,
OS_TICK timeout,
OS_OPT opt,
CPU_TS *p_ts,
OS_ERR *p_err); | (3) |
| OS_OBJ_QTY
OSMutexPendAbort(
OS_MUTEX *p_mutex,
OS_OPT opt,
OS_ERR *p_err); |
|
INT8U
OSMutexPost(
OS_EVENT *pevent); | void
OSMutexPost(
OS_MUTEX *p_mutex,
OS_OPT opt,
OS_ERR *p_err); |
|
INT8U
OSMutexQuery(
OS_EVENT *pevent,
OS_MUTEX_DATA *p_mutex_data); |
Table Cell (td) |
anchor
Panel |
---|
1090109 | 1090109 | Table Cell (td) |
---|
|
Anchor |
---|
1090111 | 1090111 | (4) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
...
|
(1) In µC/OS-III, there is no “accept” API, since this feature is built into the OSMutexPend() by specifying the OS_OPT_PEND_NON_BLOCKING option. |
...
(2) In µC/OS-II, OSMutexCreate() returns the address of an OS_EVENT , which is used as the “handle” to the message mailbox. In µC/OS-III, the application must allocate storage for an OS_MUTEX , which serves the same purpose as the OS_EVENT . The benefit in µC/OS-III is that it is not necessary to predetermine the number of mutual-exclusion semaphores at compile time. |
...
(3) µC/OS-III returns additional information when a mutex is released. The releaser takes a snapshot of the current time stamp and stores it in the OS_MUTEX . The new owner of the mutex therefore knows when the mutex was released. |
...
(4) µC/OS-III does not provide query services as they were rarely used. |