Fix: auto-resize hash table destroy deadlock
[urcu.git] / src / rculfhash-internal.h
index 0f8df97c0b6305e41cc533384586698d131bf0d7..68c4374695a039fed7230e8a21e46b4f2048b57e 100644 (file)
 
 #include <urcu/rculfhash.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "workqueue.h"
 
 #ifdef DEBUG
 #define dbg_printf(fmt, args...)     printf("[debug rculfhash] " fmt, ## args)
@@ -80,11 +84,13 @@ struct cds_lfht {
         * therefore cause grace-period deadlock if we hold off RCU G.P.
         * completion.
         */
-       pthread_mutex_t resize_mutex;   /* resize mutex: add/del mutex */
-       pthread_attr_t *resize_attr;    /* Resize threads attributes */
+       pthread_mutex_t resize_mutex;           /* resize mutex: add/del mutex */
+       pthread_attr_t *caller_resize_attr;     /* resize threads attributes from lfht_new caller */
+       pthread_attr_t resize_attr;
        unsigned int in_progress_destroy;
        unsigned long resize_target;
        int resize_initiated;
+       struct urcu_work destroy_work;
 
        /*
         * Variables needed for add and remove fast-paths.
This page took 0.023925 seconds and 4 git commands to generate.