sdk/linux_kernel_drivers/xocl/xocl_exec.c
/**
 * xocl_fini_exec() - Finalize the command execution for device
 *
 * @xdev: Device node to finalize
 *
 * Return: 0 on success, -errno otherwise
 */
Finalize the command execution for device
@xdev: Device node to finalize

0 on success, -errno otherwise
Finalize the command execution for device @xdev : Device node to finalize 0 on success - errno otherwise
int xocl_fini_exec(struct drm_xocl_dev *xdev)
{
	int i;
	fini_scheduler_thread();
	xdma_user_interrupt_config(xdev, XOCL_CSR_INTR0, false);
	xdma_user_interrupt_config(xdev, XOCL_CSR_INTR1, false);
	xdma_user_interrupt_config(xdev, XOCL_CSR_INTR2, false);
	xdma_user_interrupt_config(xdev, XOCL_CSR_INTR3, false);
	for (i=0; i<16; i++) {
		xdma_user_interrupt_config(xdev, i, false);
		if (xdev->exec.user_msix_table[i])
			eventfd_ctx_put(xdev->exec.user_msix_table[i]);
	}
	mutex_destroy(&xdev->exec.user_msix_table_lock);
	return 0;
}
int xocl_fini_exec ( struct drm_xocl_dev * xdev ) { int i ; fini_scheduler_thread ( ) ; xdma_user_interrupt_config ( xdev , XOCL_CSR_INTR0 , false ) ; xdma_user_interrupt_config ( xdev , XOCL_CSR_INTR1 , false ) ; xdma_user_interrupt_config ( xdev , XOCL_CSR_INTR2 , false ) ; xdma_user_interrupt_config ( xdev , XOCL_CSR_INTR3 , false ) ; for ( i = 0 ; i < 16 ; i ++ ) { xdma_user_interrupt_config ( xdev , i , false ) ; if ( xdev -> exec . user_msix_table [ i ] ) eventfd_ctx_put ( xdev -> exec . user_msix_table [ i ] ) ; } mutex_destroy ( & xdev -> exec . user_msix_table_lock ) ; return 0 ; }
xocl_fini_exec() - Finalize the command execution for device
 @xdev: Device node to finalize
xocl_fini_exec () - Finalize the command execution for device @xdev : Device node to finalize