Provides a read-write spin lock. More...
#include "qev.h"Go to the source code of this file.
Typedefs | |
| typedef guint32 | qev_lock_t |
| Locks are implemented without much ado. More... | |
Functions | |
| void | qev_lock_read_lock (qev_lock_t *lock) |
| Obtain a read lock. | |
| void | qev_lock_read_unlock (qev_lock_t *lock) |
| Release a read lock. | |
| void | qev_lock_write_lock (qev_lock_t *lock) |
| Obtain a write lock. | |
| void | qev_lock_write_unlock (qev_lock_t *lock) |
| Release a write lock. | |
Provides a read-write spin lock.
You may either create a a new lock with qev_lock_new/qev_lock_free, or you can allocate it statically/as part of another structure, so long as it's initialized to 0 on creation.
| typedef guint32 qev_lock_t |
Locks are implemented without much ado.
Literally, just declare this statically or in a larger structure, make sure it's 0, and baby, you got a lock goin'!
1.8.6