Reader/Writer Lock Management Routines

The FreeBSD kernel provides the following 11 functions for working with rw locks:

#include <sys/param.h>
#include <sys/lock.h>
#include <sys/rwlock.h>

void
rw_init(struct rwlock *rw, const char *name);

void
rw_init_flags(struct rwlock *rw, const char *name, int opts); void rw_rlock(struct rwlock *rw); void rw_wlock(struct rwlock *rw); int rw_try_rlock(struct rwlock *rw); int rw_try_wlock(struct rwlock *rw); void ...

Get FreeBSD Device Drivers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.