X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=map%2Flist.c;fp=map%2Flist.c;h=3b1787327984481cb9228a8150f3d7d69c900b97;hp=bc191cd7ef79290f9b7c230e7320101e7b335236;hb=7d658a03f83e64690d0c71b4733dd3f9a2c60208;hpb=6b4f3ea4891b6c0e65dfd6d41f49aee2daa9e23d diff --git a/map/list.c b/map/list.c index bc191cd..3b17873 100644 --- a/map/list.c +++ b/map/list.c @@ -298,7 +298,7 @@ map_val_t ll_remove (list_t *ll, map_key_t key) { } } while (next != old_next); TRACE("l2", "ll_remove: logically removed item %p", item, 0); - ASSERT(HAS_MARK(((volatile node_t *)item)->next)); + ASSERT(HAS_MARK(VOLATILE_DEREF(item).next)); // Atomically swap out the item's value in case another thread is updating the item while we are // removing it. This establishes which operation occurs first logically, the update or the remove. @@ -377,7 +377,7 @@ map_val_t ll_iter_next (ll_iter_t *iter, map_key_t *key_ptr) { do { item = iter->pred->next; haz_set(hp0, STRIP_MARK(item)); - } while (item != ((volatile node_t *)iter->pred)->next); + } while (item != VOLATILE_DEREF(iter->pred).next); #endif//LIST_USE_HAZARD_POINTER iter->pred = STRIP_MARK(item); if (iter->pred == NULL)