sdk/linux_kernel_drivers/xocl/xocl_exec.c
/**
 * queued_to_running() - Move a command from queued to running state if possible
 *
 * @xcmd: Command to start
 *
 * Upon success, the command is not necessarily running. In ert mode the
 * command will have been submitted to the embedded scheduler, whereas in
 * penguin mode the command has been started on a CU.
 *
 * Return: %true if command was submitted to device, %false otherwise
 */
Move a command from queued to running state if possible
@xcmd: Command to start

Upon success, the command is not necessarily running. In ert mode the
command will have been submitted to the embedded scheduler, whereas in
penguin mode the command has been started on a CU.

%true if command was submitted to device, %false otherwise
Move a command from queued to running state if possible @xcmd : Command to start Upon success the command is not necessarily running . In ert mode the command will have been submitted to the embedded scheduler whereas in penguin mode the command has been started on a CU . %true if command was submitted to device %false otherwise
static int
queued_to_running(struct xocl_cmd *xcmd)
{
	int retval = false;
	SCHED_DEBUG("-> queued_to_running\n");
	if (opcode(xcmd)==ERT_CONFIGURE)
		configure(xcmd);
	if (xcmd->xdev->exec.ops->submit(xcmd)) {
		set_cmd_int_state(xcmd,ERT_CMD_STATE_RUNNING);
		if (xcmd->xdev->exec.polling_mode)
			atomic_inc(&xcmd->xs->poll);
		xcmd->xdev->exec.submitted_cmds[xcmd->slot_idx] = xcmd;
		retval = true;
	}
	SCHED_DEBUGF("<- queued_to_running returns %d\n",retval);
	return retval;
}
static int queued_to_running ( struct xocl_cmd * xcmd ) { int retval = false ; SCHED_DEBUG ( " \n " ) ; if ( opcode ( xcmd ) == ERT_CONFIGURE ) configure ( xcmd ) ; if ( xcmd -> xdev -> exec . ops -> submit ( xcmd ) ) { set_cmd_int_state ( xcmd , ERT_CMD_STATE_RUNNING ) ; if ( xcmd -> xdev -> exec . polling_mode ) atomic_inc ( & xcmd -> xs -> poll ) ; xcmd -> xdev -> exec . submitted_cmds [ xcmd -> slot_idx ] = xcmd ; retval = true ; } SCHED_DEBUGF ( " \n " , retval ) ; return retval ; }
queued_to_running() - Move a command from queued to running state if possible
 @xcmd: Command to start
queued_to_running () - Move a command from queued to running state if possible @xcmd : Command to start