|
PatchworkOS
|
Go to the source code of this file.
Data Structures | |
| struct | rwlock_t |
| Read-Write Ticket Lock structure. More... | |
Macros | |
| #define | RWLOCK_DEADLOCK_TIMEOUT (CLOCKS_PER_SEC * 10) |
| Maximum time before we consider a deadlock to have occurred. | |
| #define | RWLOCK_READ_SCOPE(lock) |
| Acquires a rwlock for reading for the reminder of the current scope. | |
| #define | RWLOCK_WRITE_SCOPE(lock) |
| Acquires a rwlock for writing for the reminder of the current scope. | |
| #define | RWLOCK_CREATE |
| Create a rwlock initializer. | |
Typedefs | |
| typedef struct thread | thread_t |
Functions | |
| void | rwlock_init (rwlock_t *lock) |
| Initializes a rwlock. | |
| void | rwlock_read_acquire (rwlock_t *lock) |
| Acquires a rwlock for reading, blocking until it is available. | |
| void | rwlock_read_release (rwlock_t *lock) |
| Releases a rwlock from reading. | |
| void | rwlock_write_acquire (rwlock_t *lock) |
| Acquires a rwlock for writing, blocking until it is available. | |
| void | rwlock_write_release (rwlock_t *lock) |
| Releases a rwlock from writing. | |
| static void | rwlock_read_cleanup (rwlock_t **lock) |
| static void | rwlock_write_cleanup (rwlock_t **lock) |