src/stored/lock.c
void _unblock_device(const char *file, int line, DEVICE *dev)
{
   Dmsg4(sd_dbglvl, "Unblocked %s %s from %s:%d\n", dev->device->hdr.name,
      dev->print_blocked(), file, line);
   ASSERT2(dev->blocked(), "Unblock request of device not blocked");
   dev->set_blocked(BST_NOT_BLOCKED);
   dev->blocked_by = 0;
   clear_thread_id(dev->no_wait_id);
   if (dev->num_waiting > 0) {
      pthread_cond_broadcast(&dev->wait); /* wake them up */
   }
}
/*
 * Unblock the device, and wake up anyone who went to sleep.
 * Enter: device locked
 * Exit:  device locked
 */
Unblock the device, and wake up anyone who went to sleep.
Enter: device locked
Exit:  device locked
Unblock the device and wake up anyone who went to sleep . Enter : device locked Exit : device locked
void _unblock_device(const char *file, int line, DEVICE *dev)
{
   Dmsg4(sd_dbglvl, "Unblocked %s %s from %s:%d\n", dev->device->hdr.name,
      dev->print_blocked(), file, line);
   ASSERT2(dev->blocked(), "Unblock request of device not blocked");
   dev->set_blocked(BST_NOT_BLOCKED);
   dev->blocked_by = 0;
   clear_thread_id(dev->no_wait_id);
   if (dev->num_waiting > 0) {
      pthread_cond_broadcast(&dev->wait); 
   }
}
void _unblock_device ( const char * file , int line , DEVICE * dev ) { Dmsg4 ( sd_dbglvl , " \n " , dev -> device -> hdr . name , dev -> print_blocked ( ) , file , line ) ; ASSERT2 ( dev -> blocked ( ) , " " ) ; dev -> set_blocked ( BST_NOT_BLOCKED ) ; dev -> blocked_by = 0 ; clear_thread_id ( dev -> no_wait_id ) ; if ( dev -> num_waiting > 0 ) { pthread_cond_broadcast ( & dev -> wait ) ; } }
Unblock the device, and wake up anyone who went to sleep.
Unblock the device and wake up anyone who went to sleep .
/* wake them up */