mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
pci_ivshmem.c: ivshmem_support_irq API support
ivshmem based driver can use this api to judge weather current ivshmem device support irq or not, and use polling mode or irq mode to process the event. Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user