forked from nuttx/nuttx-update
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:
parent
99b6c77c79
commit
ad2e6fb2ba
2 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue