sdk/linux_kernel_drivers/xocl/xocl_exec.c
/**
 * mark_mask_complete() - Move all commands in mask to complete state
 *
 * @mask: Bitmask with queried statuses of commands
 * @mask_idx: Index of the command mask. Used to offset the actual cmd slot index
 */
Move all commands in mask to complete state
@mask: Bitmask with queried statuses of commands
@mask_idx: Index of the command mask. Used to offset the actual cmd slot index
Move all commands in mask to complete state @mask : Bitmask with queried statuses of commands @mask_idx : Index of the command mask . Used to offset the actual cmd slot index
static void
mark_mask_complete(struct drm_xocl_dev *xdev, u32 mask, unsigned int mask_idx)
{
	int bit_idx=0,cmd_idx=0;
	SCHED_DEBUGF("-> mark_mask_complete(,0x%x,%d)\n",mask,mask_idx);
	if (!mask)
		return;
	for (bit_idx=0, cmd_idx=mask_idx<<5; bit_idx<32; mask>>=1,++bit_idx,++cmd_idx)
		if (mask & 0x1)
			mark_cmd_complete(xdev->exec.submitted_cmds[cmd_idx]);
	SCHED_DEBUG("<- mark_mask_complete\n");
}
static void mark_mask_complete ( struct drm_xocl_dev * xdev , u32 mask , unsigned int mask_idx ) { int bit_idx = 0 , cmd_idx = 0 ; SCHED_DEBUGF ( " \n " , mask , mask_idx ) ; if ( ! mask ) return ; for ( bit_idx = 0 , cmd_idx = mask_idx << 5 ; bit_idx < 32 ; mask >>= 1 , ++ bit_idx , ++ cmd_idx ) if ( mask & 0x1 ) mark_cmd_complete ( xdev -> exec . submitted_cmds [ cmd_idx ] ) ; SCHED_DEBUG ( " \n " ) ; }
mark_mask_complete() - Move all commands in mask to complete state
 @mask: Bitmask with queried statuses of commands
 @mask_idx: Index of the command mask.
mark_mask_complete () - Move all commands in mask to complete state @mask : Bitmask with queried statuses of commands @mask_idx : Index of the command mask .