pci_lintr_update(struct pci_vdev *dev)
{
	pthread_mutex_lock(&dev->lintr.lock);
	if (dev->lintr.state == ASSERTED && !pci_lintr_permitted(dev)) {
		pci_irq_deassert(dev);
		dev->lintr.state = PENDING;
	} else if (dev->lintr.state == PENDING && pci_lintr_permitted(dev)) {
		dev->lintr.state = ASSERTED;
		pci_irq_assert(dev);
	}
	pthread_mutex_unlock(&dev->lintr.lock);
}
pci_lintr_update(struct pci_vdev *dev)
{
	pthread_mutex_lock(&dev->lintr.lock);
	if (dev->lintr.state == ASSERTED && !pci_lintr_permitted(dev)) {
		pci_irq_deassert(dev);
		dev->lintr.state = PENDING;
	} else if (dev->lintr.state == PENDING && pci_lintr_permitted(dev)) {
		dev->lintr.state = ASSERTED;
		pci_irq_assert(dev);
	}
	pthread_mutex_unlock(&dev->lintr.lock);
}