您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ rq_fifo_time函数代码示例

51自学网 2021-06-02 11:56:29
  C++
这篇教程C++ rq_fifo_time函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中rq_fifo_time函数的典型用法代码示例。如果您正苦于以下问题:C++ rq_fifo_time函数的具体用法?C++ rq_fifo_time怎么用?C++ rq_fifo_time使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了rq_fifo_time函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: zen_check_fifo

/* * zen_check_fifo returns 0 if there are no expired requests on the fifo, * otherwise it returns the next expired request */static struct request *zen_check_fifo(struct zen_data *zdata){        struct request *rq_sync = zen_expired_request(zdata, SYNC);        struct request *rq_async = zen_expired_request(zdata, ASYNC);        if (rq_async && rq_sync) {        	if (time_after(rq_fifo_time(rq_async), rq_fifo_time(rq_sync)))                	return rq_sync;        } else if (rq_sync) {                return rq_sync;	} else if (rq_async) {		return rq_async;	}        return 0;}
开发者ID:hallovveen31,项目名称:HELLRAZOR,代码行数:21,


示例2: zen_merged_requests

static voidzen_merged_requests(struct request_queue *q, struct request *req,                    struct request *next){	/*	 * if next expires before rq, assign its expire time to arq	 * and move into next position (next will be deleted) in fifo	 */	if (!list_empty(&req->queuelist) && !list_empty(&next->queuelist)) {		if (time_before(rq_fifo_time(next), rq_fifo_time(req))) {			list_move(&req->queuelist, &next->queuelist);			rq_set_fifo_time(req, rq_fifo_time(next));		}	}	/* next request is gone */	rq_fifo_clear(next);}
开发者ID:Minia89,项目名称:DORIMANX_LG_STOCK_LP_KERNEL,代码行数:18,


示例3: deadline_check_fifo

int ElvDeadline::deadline_check_fifo(int rw){	request *rq = (request *) fifo_list[rw].suc;	if (Event::Clock() >= rq_fifo_time(rq))		return 1;	return 0;}
开发者ID:yingjinqian,项目名称:Lustre-Simulator,代码行数:9,


示例4: zen_expired_request

/* * get the first expired request in direction ddir */static struct request *zen_expired_request(struct zen_data *zdata, int ddir){        struct request *rq;        if (list_empty(&zdata->fifo_list[ddir]))                return NULL;        rq = rq_entry_fifo(zdata->fifo_list[ddir].next);        if (time_after_eq(jiffies, rq_fifo_time(rq)))                return rq;        return NULL;}
开发者ID:Minia89,项目名称:DORIMANX_LG_STOCK_LP_KERNEL,代码行数:17,


示例5: sio_expired_request

static struct request *sio_expired_request(struct sio_data *sd, int sync, int data_dir){struct list_head *list = &sd->fifo_list[sync][data_dir];struct request *rq;if (list_empty(list))return NULL;/* Retrieve request */rq = rq_entry_fifo(list->next);/* Request has expired */if (time_after_eq(jiffies, rq_fifo_time(rq)))return rq;return NULL;}
开发者ID:F4uzan,项目名称:skernel_u0,代码行数:14,


示例6: flash_merged_requests

/*    This function does 3 tasks:   1 check if next expires before req, is so set expire time of req to be the expire time of next   2 delete next from async fifo queue   3 check if merged req size >= bundle_size; if so, delete req from async fifo queue, reinit and insert it to bundle queue */static voidflash_merged_requests(struct request_queue *q, struct request *req,			 struct request *next){	struct flash_data *fd = q->elevator->elevator_data;	// const int data_type = !rq_is_sync(req);	// FIXME:	const int data_type = rq_data_dir(req);	/*	 * if next expires before rq, assign its expire time to rq	 * and move into next position (next will be deleted) in fifo	 */	// TODO: why need to check if async queue is empty here?	if (!list_empty(&req->queuelist) && !list_empty(&next->queuelist)) {		if (time_before(rq_fifo_time(next), rq_fifo_time(req))) {			list_move(&req->queuelist, &next->queuelist);			rq_set_fifo_time(req, rq_fifo_time(next));		}	}	/* delete next */	rq_fifo_clear(next);		/* task 3 only kick into bundle queue if req is async */	if(req->__data_len >= fd->bundle_size && data_type == 1)	{		/* did both delete and init */		rq_fifo_clear(req); 		list_add_tail(&req->queuelist, &fd->bundle_list);				#ifdef DEBUG_FLASH		printk("req of type %d of size %d is inserted to bundle queue/n", data_type, req->__data_len);		#endif	}}
开发者ID:luyao-jiang,项目名称:scheduler,代码行数:43,


示例7: rq_entry_fifo

static struct request *tripndroid_expired_request(struct tripndroid_data *td, int sync, int data_dir){	struct list_head *list = &td->fifo_list[sync][data_dir];	struct request *rq;	if (list_empty(list))		return NULL;	rq = rq_entry_fifo(list->next);	if (time_after_eq(jiffies, rq_fifo_time(rq)))		return rq;	return NULL;}
开发者ID:BeastOn,项目名称:yu_msm8916,代码行数:15,


示例8: sio_expired_request

static struct request *sio_expired_request(struct sio_data *sd, int sync){struct request *rq;if (list_empty(&sd->fifo_list[sync]))return NULL;/* Retrieve request */rq = rq_entry_fifo(sd->fifo_list[sync].next);/* Request has expired */if (time_after(jiffies, rq_fifo_time(rq)))return rq;return NULL;}
开发者ID:Austrie,项目名称:SpeedDemon-Kernel,代码行数:17,


示例9: deadline_check_fifo

/* * deadline_check_fifo returns 0 if there are no expired requests on the fifo, * 1 otherwise. Requires !list_empty(&fd->fifo_list[data_type]) */static inline int deadline_check_fifo(struct flash_data *fd, int ddir){	struct request *rq;		// if no req on given list, return 0: not expire;	if(list_empty(&fd->fifo_list[ddir]))		return 0;	rq = rq_entry_fifo(fd->fifo_list[ddir].next);	/*	 * rq is expired!	 */	if (time_after(jiffies, rq_fifo_time(rq)))		return 1;	return 0;}
开发者ID:luyao-jiang,项目名称:scheduler,代码行数:22,



注:本文中的rq_fifo_time函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ rq_is_sync函数代码示例
C++ rq_fifo_clear函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。