|
IntrOS
|
mutexes (error check) More...
Macros | |
| #define | OS_MTX(mtx) |
| define and initialize a mutex object | |
| #define | static_MTX(mtx) |
| static alias of OS_MTX() | |
| #define | MTX_INIT() |
| create and initialize a mutex object | |
| #define | MTX_CREATE() |
| create and initialize a mutex object | |
| #define | MTX_NEW MTX_CREATE |
| alias of MTX_CREATE() | |
Functions | |
| void | mtx_init (mtx_t *mtx) |
| initialize a mutex object | |
| void | mtx_reset (mtx_t *mtx) |
| reset the mutex object and wake up all waiting tasks with 'E_STOPPED' event value | |
| void | mtx_kill (mtx_t *mtx) |
| alias of mtx_reset() | |
| int | mtx_take (mtx_t *mtx) |
| try to lock the mutex object, don't wait if the mutex object can't be locked immediately | |
| int | mtx_tryLock (mtx_t *mtx) |
| alias of mtx_take() | |
| int | mtx_waitFor (mtx_t *mtx, cnt_t delay) |
| try to lock the mutex object, wait for given duration of time if the mutex object can't be locked immediately | |
| int | mtx_waitUntil (mtx_t *mtx, cnt_t time) |
| try to lock the mutex object, wait until given timepoint if the mutex object can't be locked immediately | |
| int | mtx_wait (mtx_t *mtx) |
| try to lock the mutex object, wait indefinitely if the mutex object can't be locked immediately | |
| int | mtx_lock (mtx_t *mtx) |
| alias of mtx_wait() | |
| int | mtx_give (mtx_t *mtx) |
| try to unlock the mutex object (only owner task can unlock mutex object), don't wait if the mutex object can't be unlocked | |
| int | mtx_unlock (mtx_t *mtx) |
| alias of mtx_give() | |
mutexes (error check)
| #define OS_MTX | ( | mtx | ) |
define and initialize a mutex object
| mtx | name of a pointer to mutex object |
| #define static_MTX | ( | mtx | ) |
static alias of OS_MTX()
| #define MTX_INIT | ( | ) |
create and initialize a mutex object
| #define MTX_CREATE | ( | ) |
| void mtx_init | ( | mtx_t * | mtx | ) |
initialize a mutex object
| mtx | pointer to mutex object |
| void mtx_reset | ( | mtx_t * | mtx | ) |
reset the mutex object and wake up all waiting tasks with 'E_STOPPED' event value
| mtx | pointer to mutex object |
| int mtx_take | ( | mtx_t * | mtx | ) |
| int mtx_waitFor | ( | mtx_t * | mtx, |
| cnt_t | delay ) |
try to lock the mutex object, wait for given duration of time if the mutex object can't be locked immediately
| mtx | pointer to mutex object |
| delay | duration of time (maximum number of ticks to wait for lock the mutex object)
|
| int mtx_waitUntil | ( | mtx_t * | mtx, |
| cnt_t | time ) |
try to lock the mutex object, wait until given timepoint if the mutex object can't be locked immediately
| mtx | pointer to mutex object |
| time | timepoint value |
|
inline |