diff --git a/include/ck_hp.h b/include/ck_hp.h index d032f72..c7d8cfb 100644 --- a/include/ck_hp.h +++ b/include/ck_hp.h @@ -28,6 +28,7 @@ #define CK_HP_H #include +#include #include #include @@ -81,6 +82,20 @@ ck_hp_set(struct ck_hp_record *record, unsigned int i, void *pointer) return; } +CK_CC_INLINE static void +ck_hp_set_fence(struct ck_hp_record *record, unsigned int i, void *pointer) +{ + +#ifdef CK_MD_TSO + ck_pr_fas_ptr(&record->pointers[i], pointer); +#else + ck_pr_store_ptr(&record->pointers[i], pointer); + ck_pr_fence_memory(); +#endif + + return; +} + CK_CC_INLINE static void ck_hp_clear(struct ck_hp_record *record) {