osp_spin_lock(&d->mutex);if(d->q_size >0)//if another proc is waiting, give control to "front of line"{if(!d->write_lock && !d->read_locks)// no locks except uswake_up_all(&d->blockq); d->q_size++;//add to back of queueprepare_to_wait_exclusive(&d->blockq, &wait...
dev->intf =NULL;/* wake up pollers */wake_up_interruptible_all(&dev->read_wait);wake_up_interruptible_all(&dev->write_wait); mutex_unlock(&dev->mutex); } dev_info(&intf->dev,"LD USB Device #%d now disconnected\n", (minor - USB_LD_MINOR_BASE)); } 开发者ID:19Dan01,项目名...
dev->intf =NULL;/* wake up pollers */wake_up_interruptible_all(&dev->read_wait);wake_up_interruptible_all(&dev->write_wait); mutex_unlock(&dev->mutex); } dev_info(&intf->dev,"LD USB Device #%d now disconnected\n", (minor - USB_LD_MINOR_BASE)); } 开发者ID:19Dan01,项目名...