#include <shift_helper.h>
|
| ShiftHelper (ShiftOp *op_rec, helper_t *prev, T replaced_value) |
|
bool | complete_phase1 (WFVector *vec, int pos) |
|
bool | complete (WFVector *vec, int pos) |
|
bool | on_watch (std::atomic< void * > *address, void *value) |
| This method is optional to implement for each sub class. More...
|
|
void * | get_logical_value () |
| This method is implemented by each sub class. More...
|
|
template<> |
bool | complete (WFVector *vec, int pos) |
|
template<> |
bool | complete (WFVector *vec, int pos) |
|
| Descriptor () |
|
virtual | ~Descriptor () |
|
virtual void * | complete (void *current, std::atomic< void * > *address)=0 |
| This method is implemented by each sub class and must guarantee that upon return that the descriptor no longer exists at the address it was placed. More...
|
|
virtual void | on_unwatch () |
| This method must be implemented if on_watch is implemented, and is optional otherwise. More...
|
|
virtual bool | on_is_watched () |
| This method is optional to implement for each sub class. More...
|
|
template<class ShiftOp, class T>
template<class ShiftOp, class T>
template<class ShiftOp, class T>
bool ShiftHelper< ShiftOp, T >::complete |
( |
WFVector * |
vec, |
|
|
int |
pos |
|
) |
| |
template<class ParentOp >
bool ShiftHelper< ParentOp >::complete_phase1 |
( |
WFVector * |
vec, |
|
|
int |
pos |
|
) |
| |
template<class ShiftOp, class T>
This method is implemented by each sub class.
It returns the logical value of the past address. If the associated operation is still in progress then it will generally return the value that was replaced by this descriptor. Otherwise it will generally return the result of the operation for the specified address.
It can only be called from the static function which protects the object from being reused during the function.
Implements tervel::util::Descriptor.
template<class ShiftOp, class T>
bool ShiftHelper< ShiftOp, T >::on_watch |
( |
std::atomic< void * > * |
, |
|
|
void * |
|
|
) |
| |
|
inlinevirtual |
This method is optional to implement for each sub class.
In the event there is a complex dependency between descriptor objects, where watching one implies performing other actions, such as watching a parent object, a developer will implement this function to encapsulate that logic
This function is called by the static watch function It should not watch itself.
- Parameters
-
address | The location to check. |
expected | The expected value for that location |
- Returns
- true if successful, false otherwise
Reimplemented from tervel::util::Descriptor.
template<class ShiftOp, class T>
template<class ShiftOp, class T>
template<class ShiftOp, class T>
template<class ShiftOp, class T>
The documentation for this class was generated from the following file: