Update version to 0.7.4
[urcu.git] / rculfhash.c
index e9cf0622f53576ef8ad8c08eda082c37f1151b86..b8fbb6481d9291a6226f2200f8374b810ffd34af 100644 (file)
@@ -1073,6 +1073,11 @@ int _cds_lfht_del(struct cds_lfht *ht, unsigned long size,
        if (caa_unlikely(is_removed(next)))
                return -ENOENT;
        assert(!is_bucket(next));
+       /*
+        * The del operation semantic guarantees a full memory barrier
+        * before the uatomic_or atomic commit of the deletion flag.
+        */
+       cmm_smp_mb__before_uatomic_or();
        /*
         * We set the REMOVED_FLAG unconditionally. Note that there may
         * be more than one concurrent thread setting this flag.
@@ -1723,8 +1728,10 @@ int cds_lfht_destroy(struct cds_lfht *ht, pthread_attr_t **attr)
        /* Wait for in-flight resize operations to complete */
        _CMM_STORE_SHARED(ht->in_progress_destroy, 1);
        cmm_smp_mb();   /* Store destroy before load resize */
+       ht->flavor->thread_offline();
        while (uatomic_read(&ht->in_progress_resize))
                poll(NULL, 0, 100);     /* wait for 100ms */
+       ht->flavor->thread_online();
        ret = cds_lfht_delete_bucket(ht);
        if (ret)
                return ret;
This page took 0.022873 seconds and 4 git commands to generate.