diff --git a/drivers/pci/pci_ivshmem.c b/drivers/pci/pci_ivshmem.c index 46bc3bfc14222..e2d04d546eea2 100644 --- a/drivers/pci/pci_ivshmem.c +++ b/drivers/pci/pci_ivshmem.c @@ -413,6 +413,19 @@ int ivshmem_control_irq(FAR struct ivshmem_device_s *dev, bool on) return OK; } +/**************************************************************************** + * Name: ivshmem_support_irq + * + * Description: + * Judge if support ivshmem interrupt + * + ****************************************************************************/ + +bool ivshmem_support_irq(FAR struct ivshmem_device_s *dev) +{ + return dev->vmid != IVSHMEM_INVALID_VMID; +} + /**************************************************************************** * Name: ivshmem_kick_peer * diff --git a/include/nuttx/pci/pci_ivshmem.h b/include/nuttx/pci/pci_ivshmem.h index f46d83941343d..07251a4c455f3 100644 --- a/include/nuttx/pci/pci_ivshmem.h +++ b/include/nuttx/pci/pci_ivshmem.h @@ -116,6 +116,16 @@ int ivshmem_detach_irq(FAR struct ivshmem_device_s *dev); int ivshmem_control_irq(FAR struct ivshmem_device_s *dev, bool on); +/**************************************************************************** + * Name: ivshmem_support_irq + * + * Description: + * judge if support ivshmem interrupt + * + ****************************************************************************/ + +bool ivshmem_support_irq(FAR struct ivshmem_device_s *dev); + /**************************************************************************** * Name: ivshmem_kick_peer *