]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/lock.c
kes Experiment with allowing multiple read jobs.
[bacula/bacula] / bacula / src / stored / lock.c
index 9b2a4ca1f8a80b4e97a0afaa7e53083275f1d75a..647dd19dcf01f25f44b2e34c6ec072ebcdfc6efc 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -88,6 +88,16 @@ const int dbglvl = 500;
  *   DEVICE::dlock()   does P(m_mutex)     (in dev.h)
  *   DEVICE::dunlock() does V(m_mutex)
  *
+ *   DEVICE::r_dlock() allows locking the device when this thread
+                         already has the device blocked.
+ *                    dlock()
+ *                    if blocked and not same thread that locked
+ *                       pthread_cond_wait
+ *                    leaves device locked 
+ *
+ *   DEVICE::r_dunlock() unlocks but does not unblock
+ *                    same as dunlock();
+ *
  *   DEVICE::dblock(why)  does 
  *                    r_dlock();         (recursive device lock)
  *                    block_device(this, why) 
@@ -98,15 +108,6 @@ const int dbglvl = 500;
  *                    unblock_device()
  *                    dunlock()
  *
- *   DEVICE::r_dlock() does recursive locking
- *                    dlock()
- *                    if blocked and not same thread that locked
- *                       pthread_cond_wait
- *                    leaves device locked 
- *
- *   DEVICE::r_dunlock()
- *                    same as dunlock();
- *
  *   block_device() does  (must be locked and not blocked at entry)  
  *                    set blocked status
  *                    set our pid