Click
Loading...
Searching...
No Matches
Public Member Functions | List of all members
unprotected_rcu< T, N > Class Template Reference

#include <multithread.hh>

Inheritance diagram for unprotected_rcu< T, N >:
unprotected_rcu_singlewriter< T, N >

Public Member Functions

T & write_begin ()
 
void write_commit ()
 
void write_abort ()
 
- Public Member Functions inherited from unprotected_rcu_singlewriter< T, N >
 unprotected_rcu_singlewriter (T v)
 
void initialize (T v)
 
const T & read_begin ()
 
void read_end ()
 
const T & read () const
 
const T operator* () const
 
const T * operator-> () const
 
T & write_begin ()
 
void write_commit ()
 
void write_abort ()
 
const T & read_begin (int)
 
void read_end (int)
 

Additional Inherited Members

- Protected Attributes inherited from unprotected_rcu_singlewriter< T, N >
T storage [N]
 
volatile int rcu_current
 

Detailed Description

template<typename T, int N>
class unprotected_rcu< T, N >

unprotected_rcu works like unprotected_rcu_singlewriter but can have multiple writer.

Usage is the same but attempt to write use a spinlock. In handlers or other slow path, use this version. In other cases, double check if there could be multiple writers at the same time, and if not, use unprotected_rcu_singlewriter.

Failing to call write_commit() will cause a dead lock !!!

To abort a write, use write_abort();


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