sdk/linux_kernel_drivers/xocl/xocl_exec.c
/**
 * recycle_cmd() - recycle a command objects 
 *
 * @xcmd: command object to recycle
 *
 * Command object is added to the freelist
 *
 * Return: 0
 */
recycle a command objects
@xcmd: command object to recycle

Command object is added to the freelist

0
recycle a command objects @xcmd : command object to recycle Command object is added to the freelist 0
static int
recycle_cmd(struct xocl_cmd* xcmd)
{
	SCHED_DEBUGF("recycle %p\n",xcmd);
	mutex_lock(&free_cmds_mutex);
	list_del(&xcmd->list);
	list_add_tail(&xcmd->list,&free_cmds);
	mutex_unlock(&free_cmds_mutex);
	return 0;
}
static int recycle_cmd ( struct xocl_cmd * xcmd ) { SCHED_DEBUGF ( " \n " , xcmd ) ; mutex_lock ( & free_cmds_mutex ) ; list_del ( & xcmd -> list ) ; list_add_tail ( & xcmd -> list , & free_cmds ) ; mutex_unlock ( & free_cmds_mutex ) ; return 0 ; }
recycle_cmd() - recycle a command objects
 @xcmd: command object to recycle
recycle_cmd () - recycle a command objects @xcmd : command object to recycle