XilinxProcessorIPLib/drivers/aiengine/src/lib/ext/xaieio.c
u8 XAieIO_MemSyncForDev(XAieIO_Mem *IO_MemInstPtr)
{
	int ret;

	if (!IO_MemInstPtr->shm) {
		return XAIELIB_SUCCESS;
	}

	ret = metal_shm_sync_for_device(IO_MemInstPtr->shm, IOInst.device,
			METAL_SHM_DIR_DEV_RW);
	if (ret) {
		return XAIELIB_FAILURE;
	}
	return XAIELIB_SUCCESS;
}
/*****************************************************************************/
/**
*
* This is the IO memory function to sync the memory for device
*
* @param	IO_MemInstPtr: IO Memory instance pointer.
*
* @return	None.
*
* @note		This only works with imported or allocated memory. This doesn't
* do anything with memory from the own memory pool, ex XAieIO_MemInit().
*
*******************************************************************************/
This is the IO memory function to sync the memory for device
This is the IO memory function to sync the memory for device
u8 XAieIO_MemSyncForDev(XAieIO_Mem *IO_MemInstPtr)
{
	int ret;
	if (!IO_MemInstPtr->shm) {
		return XAIELIB_SUCCESS;
	}
	ret = metal_shm_sync_for_device(IO_MemInstPtr->shm, IOInst.device,
			METAL_SHM_DIR_DEV_RW);
	if (ret) {
		return XAIELIB_FAILURE;
	}
	return XAIELIB_SUCCESS;
}
u8 XAieIO_MemSyncForDev ( XAieIO_Mem * IO_MemInstPtr ) { int ret ; if ( ! IO_MemInstPtr -> shm ) { return XAIELIB_SUCCESS ; } ret = metal_shm_sync_for_device ( IO_MemInstPtr -> shm , IOInst . device , METAL_SHM_DIR_DEV_RW ) ; if ( ret ) { return XAIELIB_FAILURE ; } return XAIELIB_SUCCESS ; }
This is the IO memory function to sync the memory for device
This is the IO memory function to sync the memory for device