|
Click
|
#include <multithread.hh>
Public Member Functions | |
| rwlock (V v) | |
| ptr | read () |
| write_ptr | write () |
| write_ptr | read_to_write (const ptr &o) |
| ptr | write_to_read (const write_ptr &o) |
| V * | unprotected_ptr () |
| uint32_t | refcnt () |
Shared-pointer based rwlock
|
inline |
Destroys the given read pointer and return a write pointer.
This may fail, in which case the returned and the given pointer are both null.
In any case attempting to access the given read pointer will cause segfault
|
inline |
Destroys the given write pointer and return a read pointer.
Attempting to access the given write pointer afterwards will cause segfault