• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ rq_fifo_clear函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: deadline_remove_request

/*
 * remove rq from rbtree and fifo.
 */
static void deadline_remove_request(struct request_queue *q, struct request *rq)
{
	struct deadline_data *dd = q->elevator->elevator_data;

	rq_fifo_clear(rq);
	deadline_del_rq_rb(dd, rq);
}
开发者ID:poondog,项目名称:kangaroo-m7-mkII,代码行数:10,代码来源:deadline-iosched.c


示例2: vr_add_request

static void
vr_add_request(struct request_queue *q, struct request *rq)
{
struct sio_data *sd = q->elevator->elevator_data;
const int sync = rq_is_sync(rq);
const int data_dir = rq_data_dir(rq);
/*
* We might be deleting our cached next request.
* If so, find its sucessor.
*/

/*
* add rq to rbtree and fifo
*/
static void
vr_add_request(struct request_queue *q, struct request *rq)
struct request *next)
{
struct vr_data *vd = vr_get_data(q);
const int dir = rq_is_sync(rq);
}
/*
* If next expires before rq, assign its expire time to rq
* and move into next position (next will be deleted) in fifo.
*/
if (!list_empty(&rq->queuelist) && !list_empty(&next->queuelist)) {
if (time_before(rq_fifo_time(next), rq_fifo_time(rq))) {
list_move(&rq->queuelist, &next->queuelist);
rq_set_fifo_time(rq, rq_fifo_time(next));
}
}

/* Delete next request */
rq_fifo_clear(next);
}
开发者ID:Zoldyck07,项目名称:Intuisy-3.4.xx-Kernel,代码行数:35,代码来源:vr-iosched.c


示例3: flash_merged_request

/*  Implement elevator_merge_fn: do nothing for now
    Implement elevator_merged_fn: If larger than predefined bundle size, remove from async queue and add to tail of bundle queue; 
*/
static void flash_merged_request(struct request_queue *q,
				    struct request *req, int type)
{
	struct flash_data *fd = q->elevator->elevator_data;
	// FIXME:
	// const int data_type = !rq_is_sync(req);
	const int data_type = rq_data_dir(req);

	// BUG if req already in bundle queue
	/* FIXME: how to check if a req belong to certain queue? */

	// if req >= bundle_size, delete from async_fifo queue, add tail to bundle queue
	#ifdef DEBUG_FLASH
	printk("req is of size %d after merging\n", req->__data_len);
	#endif

	// only kick req 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,代码行数:30,代码来源:flash-iosched.c


示例4: zen_dispatch

static void zen_dispatch(struct zen_data *zdata, struct request *rq)
{
	/* Remove request from list and dispatch it */
	rq_fifo_clear(rq);
	elv_dispatch_add_tail(rq->q, rq);

	/* Increment # of sequential requests */
	zdata->batching++;
}
开发者ID:Fechinator,项目名称:FechdaKernel,代码行数:9,代码来源:zen-iosched.c


示例5: sio_dispatch_request

static inline void
sio_dispatch_request(struct sio_data *sd, struct request *rq)
{
/*
* Remove the request from the fifo list
* and dispatch it.
*/
rq_fifo_clear(rq);
elv_dispatch_add_tail(rq->q, rq);

sd->batched++;
}
开发者ID:Austrie,项目名称:SpeedDemon-Kernel,代码行数:12,代码来源:sio-iosched.c


示例6: flash_move_to_dispatch

/*
 * move request from additional fifo list to dispatch queue.
 */
static inline void
flash_move_to_dispatch(struct flash_data *dd, struct request *rq)
{
	struct request_queue *q = rq->q;

	/* remove rq from its associated fifo queue and reinit */
	rq_fifo_clear(rq);
	elv_dispatch_add_tail(q, rq);
	#ifdef DEBUG_FLASH
	printk("req of size %d is moved to dispatch queue\n", rq->__data_len);
	#endif
}
开发者ID:luyao-jiang,项目名称:scheduler,代码行数:15,代码来源:flash-iosched.c


示例7: tripndroid_dispatch_request

static inline void tripndroid_dispatch_request(struct tripndroid_data *td, struct request *rq)
{
	/* Dispatch the request */
	rq_fifo_clear(rq);
	elv_dispatch_add_tail(rq->q, rq);

	td->batched++;

	if (rq_data_dir(rq))
		td->starved = 0;
	else
		td->starved++;
}
开发者ID:abazad,项目名称:nethunter-kernel,代码行数:13,代码来源:tripndroid-iosched.c


示例8: sio_merged_requests

static void
sio_merged_requests(struct request_queue *q, struct request *rq,
		    struct request *next)
{
	if (!list_empty(&rq->queuelist) && !list_empty(&next->queuelist)) {
		if (time_before(rq_fifo_time(next), rq_fifo_time(rq))) {
			list_move(&rq->queuelist, &next->queuelist);
			rq_set_fifo_time(rq, rq_fifo_time(next));
		}
	}

	rq_fifo_clear(next);
}
开发者ID:SomcDebrandEngine,项目名称:SDE-2.6.32.2-Kernel,代码行数:13,代码来源:sio-iosched.c


示例9: sio_dispatch_request

static inline void
sio_dispatch_request(struct sio_data *sd, struct request *rq)
{
	rq_fifo_clear(rq);
	elv_dispatch_add_tail(rq->q, rq);

	if (rq_data_dir(rq)) {
		sd->starved = 0;
	} else {
		if (!list_empty(&sd->fifo_list[SYNC][WRITE]) || 
				!list_empty(&sd->fifo_list[ASYNC][WRITE]))
			sd->starved++;
	}
}
开发者ID:Malpa73,项目名称:FeraLab_GB_Firmware--archive,代码行数:14,代码来源:sio-iosched.c


示例10: 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 void
flash_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,代码来源:flash-iosched.c


示例11: tripndroid_merged_requests

static void tripndroid_merged_requests(struct request_queue *q, struct request *rq,
		    struct request *next)
{
	/*
	 * If next expires before rq, assign its expire time to rq
	 * and move into next position (next will be deleted) in fifo.
	 */
	if (!list_empty(&rq->queuelist) && !list_empty(&next->queuelist)) {
		time_before(next->fifo_time, rq->fifo_time); {
			list_move(&rq->queuelist, &next->queuelist);
			rq->fifo_time = next->fifo_time;
		}
	}

	rq_fifo_clear(next);
}
开发者ID:abazad,项目名称:nethunter-kernel,代码行数:16,代码来源:tripndroid-iosched.c


示例12: sio_dispatch_request

static inline void
sio_dispatch_request(struct sio_data *sd, struct request *rq)
{
	/* Remove the request from the fifo list and dispatch it. */
	rq_fifo_clear(rq);
	elv_dispatch_add_tail(rq->q, rq);

	sd->batched++;

	if (rq_data_dir(rq)) {
		sd->starved = 0;
	} else {
		if (!list_empty(&sd->fifo_list[SYNC][WRITE]) ||
				!list_empty(&sd->fifo_list[ASYNC][WRITE]))
			sd->starved++;
	}
}
开发者ID:demonking,项目名称:Dhollmen_Kernel,代码行数:17,代码来源:sio-iosched.c


示例13: sio_merged_requests

static void
sio_merged_requests(struct request_queue *q, struct request *rq,
struct request *next)
{
/*
* If next expires before rq, assign its expire time to rq
* and move into next position (next will be deleted) in fifo.
*/
if (!list_empty(&rq->queuelist) && !list_empty(&next->queuelist)) {
if (time_before(rq_fifo_time(next), rq_fifo_time(rq))) {
list_move(&rq->queuelist, &next->queuelist);
rq_set_fifo_time(rq, rq_fifo_time(next));
}
}
/* Delete next request */
rq_fifo_clear(next);
}
开发者ID:F4uzan,项目名称:skernel_u0,代码行数:17,代码来源:sioplus-iosched.c


示例14: rq_fifo_clear

void ElvDeadline::deadline_remove_request(request *rq)
{
	rq_fifo_clear(rq);
	deadline_del_rq_rb(rq);
}
开发者ID:yingjinqian,项目名称:Lustre-Simulator,代码行数:5,代码来源:elvdeadline.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ rq_fifo_time函数代码示例发布时间:2022-05-30
下一篇:
C++ rq_entry_fifo函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap