Reader writer lock
struct rwlock { (uintptr_t) lock_word;};enum rwlock_acquire_type { RWLOCK_ACQUIRE_READ = 0, RWLOCK_ACQUIRE_WRITE = 1,};void rwlock_lock(struct rwlock *lock, enum rwlock_acquire_type type);rwlock_lock referenced types:
void rwlock_unlock(struct rwlock *lock);rwlock_unlock referenced types:
void rwlock_init(struct rwlock *lock, enum thread_prio_class ceiling);rwlock_init referenced types:
Defines
Section titled “Defines”#define RWLOCK_PRIO_CEIL_SHIFT (1)#define RWLOCK_INIT(ceil) {((ceil) << RWLOCK_PRIO_CEIL_SHIFT)}