|
IntrOS
|
read/write locks More...
Macros | |
| #define | OS_RWL(rwl) |
| define and initialize a read/write lock object | |
| #define | static_RWL(rwl) |
| static alias of OS_RWL() | |
| #define | RWL_INIT() |
| create and initialize a read/write lock object | |
| #define | RWL_CREATE() |
| create and initialize a read/write lock object | |
| #define | RWL_NEW RWL_CREATE |
| alias of RWL_CREATE() | |
Functions | |
| void | rwl_init (rwl_t *rwl) |
| initialize a read/write lock object | |
| void | rwl_reset (rwl_t *rwl) |
| reset the read/write lock object and wake up all waiting tasks with 'E_STOPPED' event value | |
| void | rwl_kill (rwl_t *rwl) |
| alias of rwl_reset() | |
| int | rwl_takeRead (rwl_t *rwl) |
| try to lock the reader, don't wait if the reader can't be locked immediately | |
| int | rwl_tryLockRead (rwl_t *rwl) |
| alias of rwl_takeRead() | |
| int | rwl_waitReadFor (rwl_t *rwl, cnt_t delay) |
| try to lock the reader, wait for given duration of time if the reader can't be locked immediately | |
| int | rwl_waitReadUntil (rwl_t *rwl, cnt_t time) |
| try to lock the reader, wait until given timepoint if the reader can't be locked immediately | |
| int | rwl_waitRead (rwl_t *rwl) |
| try to lock the reader, wait indefinitely if the reader can't be locked immediately | |
| int | rwl_lockRead (rwl_t *rwl) |
| alias of rwl_waitRead() | |
| void | rwl_giveRead (rwl_t *rwl) |
| unlock the reader | |
| void | rwl_unlockRead (rwl_t *rwl) |
| alias of rwl_giveRead() | |
| int | rwl_takeWrite (rwl_t *rwl) |
| try to lock the writer, don't wait if the writer can't be locked immediately | |
| int | rwl_tryLockWrite (rwl_t *rwl) |
| alias of rwl_takeWrite() | |
| int | rwl_waitWriteFor (rwl_t *rwl, cnt_t delay) |
| try to lock the writer, wait for given duration of time if the writer can't be locked immediately | |
| int | rwl_waitWriteUntil (rwl_t *rwl, cnt_t time) |
| try to lock the writer, wait until given timepoint if the writer can't be locked immediately | |
| int | rwl_waitWrite (rwl_t *rwl) |
| try to lock the writer, wait indefinitely if the writer can't be locked immediately | |
| int | rwl_lockWrite (rwl_t *rwl) |
| alias of rwl_waitWrite() | |
| void | rwl_giveWrite (rwl_t *rwl) |
| unlock the writer | |
| void | rwl_unlockWrite (rwl_t *rwl) |
| alias of rwl_giveWrite() | |
read/write locks
| #define OS_RWL | ( | rwl | ) |
define and initialize a read/write lock object
| rwl | name of a pointer to read/write lock object |
| #define static_RWL | ( | rwl | ) |
static alias of OS_RWL()
| #define RWL_INIT | ( | ) |
create and initialize a read/write lock object
| #define RWL_CREATE | ( | ) |
| void rwl_init | ( | rwl_t * | rwl | ) |
initialize a read/write lock object
| rwl | pointer to read/write lock object |
| void rwl_reset | ( | rwl_t * | rwl | ) |
reset the read/write lock object and wake up all waiting tasks with 'E_STOPPED' event value
| rwl | pointer to read/write lock object |
| int rwl_takeRead | ( | rwl_t * | rwl | ) |
| int rwl_waitReadFor | ( | rwl_t * | rwl, |
| cnt_t | delay ) |
try to lock the reader, wait for given duration of time if the reader can't be locked immediately
| rwl | pointer to read/write lock object |
| delay | duration of time (maximum number of ticks to wait for lock the reader)
|
| int rwl_waitReadUntil | ( | rwl_t * | rwl, |
| cnt_t | time ) |
try to lock the reader, wait until given timepoint if the reader can't be locked immediately
| rwl | pointer to read/write lock object |
| time | timepoint value |
|
inline |
| void rwl_giveRead | ( | rwl_t * | rwl | ) |
unlock the reader
| rwl | pointer to read/write lock object |
| int rwl_takeWrite | ( | rwl_t * | rwl | ) |
| int rwl_waitWriteFor | ( | rwl_t * | rwl, |
| cnt_t | delay ) |
try to lock the writer, wait for given duration of time if the writer can't be locked immediately
| rwl | pointer to read/write lock object |
| delay | duration of time (maximum number of ticks to wait for lock the writer)
|
| int rwl_waitWriteUntil | ( | rwl_t * | rwl, |
| cnt_t | time ) |
try to lock the writer, wait until given timepoint if the writer can't be locked immediately
| rwl | pointer to read/write lock object |
| time | timepoint value |
|
inline |
| void rwl_giveWrite | ( | rwl_t * | rwl | ) |
unlock the writer
| rwl | pointer to read/write lock object |