]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/rwlock.h
First cut selection list
[bacula/bacula] / bacula / src / lib / rwlock.h
index a6c5c27bfa7fe27fbbd896699049ad136fcde48c..c07e5c68755b357c1de3f267d38e1b82f41d5b5c 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -66,6 +66,8 @@ typedef struct s_rwsteal_tag {
    {PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, \
     PTHREAD_COND_INITIALIZER, RWLOCK_VALID, 0, 0, 0, 0}
 
+#define rwl_writelock(x)     rwl_writelock_p((x), __FILE__, __LINE__)
+
 /*
  * read/write lock prototypes
  */
@@ -74,7 +76,8 @@ extern int rwl_destroy(brwlock_t *rwlock);
 extern int rwl_readlock(brwlock_t *rwlock);
 extern int rwl_readtrylock(brwlock_t *rwlock);
 extern int rwl_readunlock(brwlock_t *rwlock);
-extern int rwl_writelock(brwlock_t *rwlock);
+extern int rwl_writelock_p(brwlock_t *rwlock,
+                           const char *file="*unknown*", int line=0);
 extern int rwl_writetrylock(brwlock_t *rwlock);
 extern int rwl_writeunlock(brwlock_t *rwlock);