From cc003e46d18ab34e638655ff3a5ee52fbb24165e Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 12 Mar 2010 11:24:21 +0100 Subject: [PATCH] Add read_vol_list mutex to lockmgr prio --- bacula/src/lib/mutex_list.h | 1 + bacula/src/stored/vol_mgr.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bacula/src/lib/mutex_list.h b/bacula/src/lib/mutex_list.h index 5b3e09460d..dc81a858b3 100644 --- a/bacula/src/lib/mutex_list.h +++ b/bacula/src/lib/mutex_list.h @@ -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 diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index 6f0de21c41..5bc9ba840d 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.c @@ -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); -- 2.39.5