Click
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rwlock< V > Class Template Reference

#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 ()
 

Detailed Description

template<typename V>
class rwlock< V >

Shared-pointer based rwlock

Member Function Documentation

◆ read_to_write()

template<typename V >
write_ptr rwlock< V >::read_to_write ( const ptr &  o)
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

◆ write_to_read()

template<typename V >
ptr rwlock< V >::write_to_read ( const write_ptr &  o)
inline

Destroys the given write pointer and return a read pointer.

Attempting to access the given write pointer afterwards will cause segfault


The documentation for this class was generated from the following file: