]> git.sur5r.net Git - bacula/bacula/commitdiff
Add read_vol_list mutex to lockmgr prio
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 12 Mar 2010 10:24:21 +0000 (11:24 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:39 +0000 (16:49 +0200)
bacula/src/lib/mutex_list.h
bacula/src/stored/vol_mgr.c

index 5b3e09460dfccf4aa41809593d9391f83bc2c630..dc81a858b30370e3108bbae022ac7ba61ff07000 100644 (file)
@@ -37,6 +37,7 @@
 #define PRIO_SD_DEV_ACQUIRE   4            /* dev.acquire_mutex */
 #define PRIO_SD_DEV_ACCESS    5            /* dev.m_mutex */
 #define PRIO_SD_VOL_LIST      10           /* vol_list_lock */
+#define PRIO_SD_READ_VOL_LIST 12           /* read_vol_list */
 #define PRIO_SD_DEV_SPOOL     14           /* dev.spool_mutex */
 
 #endif
index 6f0de21c41cb1ac93fbe2c35d66c02258872ffd9..5bc9ba840d8dad70f553b1aef29c4972b34daefb 100644 (file)
@@ -44,7 +44,7 @@ const int dbglvl =  150;
 static dlist *vol_list = NULL;
 static brwlock_t vol_list_lock;
 static dlist *read_vol_list = NULL;
-static pthread_mutex_t read_vol_lock = PTHREAD_MUTEX_INITIALIZER;
+static bthread_mutex_t read_vol_lock = BTHREAD_MUTEX_PRIORITY(PRIO_SD_READ_VOL_LIST);
 
 /* Forward referenced functions */
 static void free_vol_item(VOLRES *vol);