|
|
@ -94,6 +94,17 @@ struct ck_hs_map {
|
|
|
|
void **entries;
|
|
|
|
void **entries;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
|
|
|
|
ck_hs_map_signal(struct ck_hs_map *map, unsigned long h)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h &= CK_HS_G_MASK;
|
|
|
|
|
|
|
|
ck_pr_store_uint(&map->generation[h],
|
|
|
|
|
|
|
|
map->generation[h] + 1);
|
|
|
|
|
|
|
|
ck_pr_fence_store();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
ck_hs_iterator_init(struct ck_hs_iterator *iterator)
|
|
|
|
ck_hs_iterator_init(struct ck_hs_iterator *iterator)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -575,8 +586,7 @@ ck_hs_gc(struct ck_hs *hs, unsigned long cycles, unsigned long seed)
|
|
|
|
const void *insert = ck_hs_marshal(hs->mode, entry, h);
|
|
|
|
const void *insert = ck_hs_marshal(hs->mode, entry, h);
|
|
|
|
|
|
|
|
|
|
|
|
ck_pr_store_ptr(first, insert);
|
|
|
|
ck_pr_store_ptr(first, insert);
|
|
|
|
ck_pr_inc_uint(&map->generation[h & CK_HS_G_MASK]);
|
|
|
|
ck_hs_map_signal(map, h);
|
|
|
|
ck_pr_fence_atomic_store();
|
|
|
|
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -633,8 +643,7 @@ ck_hs_fas(struct ck_hs *hs,
|
|
|
|
|
|
|
|
|
|
|
|
if (first != NULL) {
|
|
|
|
if (first != NULL) {
|
|
|
|
ck_pr_store_ptr(first, insert);
|
|
|
|
ck_pr_store_ptr(first, insert);
|
|
|
|
ck_pr_inc_uint(&map->generation[h & CK_HS_G_MASK]);
|
|
|
|
ck_hs_map_signal(map, h);
|
|
|
|
ck_pr_fence_atomic_store();
|
|
|
|
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ck_pr_store_ptr(slot, insert);
|
|
|
|
ck_pr_store_ptr(slot, insert);
|
|
|
@ -711,8 +720,7 @@ restart:
|
|
|
|
ck_pr_store_ptr(first, insert);
|
|
|
|
ck_pr_store_ptr(first, insert);
|
|
|
|
|
|
|
|
|
|
|
|
if (object != NULL) {
|
|
|
|
if (object != NULL) {
|
|
|
|
ck_pr_inc_uint(&map->generation[h & CK_HS_G_MASK]);
|
|
|
|
ck_hs_map_signal(map, h);
|
|
|
|
ck_pr_fence_atomic_store();
|
|
|
|
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -768,8 +776,7 @@ restart:
|
|
|
|
* duplicate key.
|
|
|
|
* duplicate key.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (object != NULL) {
|
|
|
|
if (object != NULL) {
|
|
|
|
ck_pr_inc_uint(&map->generation[h & CK_HS_G_MASK]);
|
|
|
|
ck_hs_map_signal(map, h);
|
|
|
|
ck_pr_fence_atomic_store();
|
|
|
|
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
ck_pr_store_ptr(slot, CK_HS_TOMBSTONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|