src/stored/lock.c
void _block_device(const char *file, int line, DEVICE *dev, int state)
{
   ASSERT2(dev->blocked() == BST_NOT_BLOCKED, "Block request of device already blocked");
   dev->set_blocked(state);           /* make other threads wait */
   dev->no_wait_id = pthread_self();  /* allow us to continue */
   dev->blocked_by = get_jobid_from_tsd();
   Dmsg4(sd_dbglvl, "Blocked %s %s from %s:%d\n",
      dev->device->hdr.name, dev->print_blocked(), file, line);
}
/*
 * Block all other threads from using the device
 *  Device must already be locked.  After this call,
 *  the device is blocked to any thread calling dev->rLock(),
 *  but the device is not locked (i.e. no P on device).  Also,
 *  the current thread can do slip through the dev->rLock()
 *  calls without blocking.
 */
Block all other threads from using the device
Device must already be locked.  After this call,
the device is blocked to any thread calling dev->rLock(),
but the device is not locked .  Also,
the current thread can do slip through the dev->rLock()
calls without blocking.
Block all other threads from using the device Device must already be locked . After this call the device is blocked to any thread calling dev - > rLock () but the device is not locked . Also the current thread can do slip through the dev - > rLock () calls without blocking .
void _block_device(const char *file, int line, DEVICE *dev, int state)
{
   ASSERT2(dev->blocked() == BST_NOT_BLOCKED, "Block request of device already blocked");
   dev->set_blocked(state);           
   dev->no_wait_id = pthread_self();  
   dev->blocked_by = get_jobid_from_tsd();
   Dmsg4(sd_dbglvl, "Blocked %s %s from %s:%d\n",
      dev->device->hdr.name, dev->print_blocked(), file, line);
}
void _block_device ( const char * file , int line , DEVICE * dev , int state ) { ASSERT2 ( dev -> blocked ( ) == BST_NOT_BLOCKED , " " ) ; dev -> set_blocked ( state ) ; dev -> no_wait_id = pthread_self ( ) ; dev -> blocked_by = get_jobid_from_tsd ( ) ; Dmsg4 ( sd_dbglvl , " \n " , dev -> device -> hdr . name , dev -> print_blocked ( ) , file , line ) ; }
Block all other threads from using the device
  Device must already be locked.
Block all other threads from using the device Device must already be locked .
/* make other threads wait */ /* allow us to continue */