25 #ifndef TERVEL_UTIL_PROGRESS_ASSURANCE_H_
26 #define TERVEL_UTIL_PROGRESS_ASSURANCE_H_
73 bool on_watch(std::atomic<void *> *address,
void *expected) {
153 static __thread
size_t delay_count =
HELP_DELAY;
154 static __thread
size_t help_id = 0;
156 if (delay_count-- == 0) {
158 if (progress_assuarance ==
nullptr) {
162 progress_assuarance->p_check_for_announcement(help_id);
175 prog_assur->p_make_announcement(op, tid);
210 #endif // TERVEL_UTIL_PROGRESS_ASSURANCE_H_
virtual void help_complete()=0
Implementations of this function that upon its return the operation described in the OpRecord has bee...
virtual void on_unwatch()
This function is used to remove a strong watch on an Element.
Definition: hp_element.h:106
static void check_for_announcement(ProgressAssurance *const progress_assuarance=nullptr)
This function checks at most one position in the op_table_ for an OPRecod If one is found it will cal...
Definition: progress_assurance.h:151
bool on_watch(std::atomic< void * > *address, void *expected)
This function is used to achieve a strong watch on an Element.
Definition: progress_assurance.h:73
OpRecord()
Definition: progress_assurance.h:54
void p_make_announcement(OpRecord *op, const uint64_t tid=tervel::tl_thread_info->get_thread_id())
This function places the.
TODO(steven):
Definition: mcas.h:36
Limit(size_t limit=TERVEL_PROG_ASSUR_LIMIT)
Definition: progress_assurance.h:122
size_t counter_
Definition: progress_assurance.h:135
bool on_is_watched()
This function is used to check a strong watch on an Element.
Definition: progress_assurance.h:84
DISALLOW_COPY_AND_ASSIGN(OpRecord)
This class is used for the creation of Hazard Pointer Protected Objects Objects which extend it have ...
Definition: hp_element.h:53
const size_t num_threads_
The number of threads that are using this operation table.
Definition: progress_assurance.h:202
static void make_announcement(OpRecord *op, const uint64_t tid=tervel::tl_thread_info->get_thread_id(), ProgressAssurance *const prog_assur=tervel::tl_thread_info->get_progress_assurance())
This function places the.
Definition: progress_assurance.h:172
__thread ThreadContext * tl_thread_info
#define TERVEL_PROG_ASSUR_DELAY
Definition: util.h:90
This class is used to create Operation Records.
Definition: progress_assurance.h:52
This class represents the progress assurance scheme employed by our library.
Definition: progress_assurance.h:106
virtual bool on_watch(std::atomic< void * > *address, void *expected)
This function is used to achieve a strong watch on an Element.
Definition: hp_element.h:91
virtual bool on_is_watched()
This function is used to check a strong watch on an Element.
Definition: hp_element.h:101
void p_check_for_announcement(size_t &hpos)
This function checks at most one position in the op_table_ for an OPRecod If one is found it will cal...
#define TERVEL_PROG_ASSUR_LIMIT
Definition: util.h:121
static constexpr size_t HELP_DELAY
Const used to delay an announcement.
Definition: progress_assurance.h:117
bool isDelayed(size_t val=1)
Definition: progress_assurance.h:125
std::unique_ptr< std::atomic< OpRecord * >[]> op_table_
Table for storing operation records, each thread has its own position that corresponds to its thread ...
Definition: progress_assurance.h:197
Definition: progress_assurance.h:120
void reset(size_t limit=TERVEL_PROG_ASSUR_LIMIT)
Definition: progress_assurance.h:131
util::ProgressAssurance *const get_progress_assurance()
ProgressAssurance(size_t num_threads)
Definition: progress_assurance.h:138
DISALLOW_COPY_AND_ASSIGN(ProgressAssurance)
void on_unwatch()
This function is used to remove a strong watch on an Element.
Definition: progress_assurance.h:90