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

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

51自学网 2021-06-03 08:41:34
  C++
这篇教程C++ tbase_get_deferrable函数代码示例写得很实用,希望能帮到您。

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

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

示例1: init_timers_cpu

static int __cpuinit init_timers_cpu(int cpu){	int j;	struct tvec_base *base;	static char __cpuinitdata tvec_base_done[NR_CPUS];		if (!tvec_base_done[cpu]) {		static char boot_done;				if (boot_done) {			/*			 * The APs use this path later in boot			 */			base = kmalloc_node(sizeof(*base),							  GFP_KERNEL | __GFP_ZERO,							  cpu_to_node(cpu));			if (!base)				return -ENOMEM;						/* Make sure that tvec_base is 2 byte aligned */			if (tbase_get_deferrable(base)) {				WARN_ON(1);				kfree(base);				return -ENOMEM;			}			per_cpu(tvec_bases, cpu) = base;		} else {			/*			 * This is for the boot CPU - we use compile-time			 * static initialisation because per-cpu memory isn't			 * ready yet and because the memory allocators are not			 * initialised either.			 */			boot_done = 1;			base = &boot_tvec_bases;			per_cpu(tvec_bases, cpu) = base;		}		tvec_base_done[cpu] = 1;	} else {		base = per_cpu(tvec_bases, cpu);	}		spin_lock_init(&base->lock);		for (j = 0; j < TVN_SIZE; j++) {		INIT_LIST_HEAD(base->tv5.vec + j);		INIT_LIST_HEAD(base->tv4.vec + j);		INIT_LIST_HEAD(base->tv3.vec + j);		INIT_LIST_HEAD(base->tv2.vec + j);	}	for (j = 0; j < TVR_SIZE; j++)		INIT_LIST_HEAD(base->tv1.vec + j);		base->timer_jiffies = jiffies;	base->next_timer = base->timer_jiffies;	base->active_timers = 0;	return 0;}
开发者ID:goumuli,项目名称:GridOS,代码行数:58,


示例2: detach_if_pending

static int detach_if_pending(struct timer_list *timer, struct tvec_base *base,							 bool clear_pending){	if (!timer_pending(timer))		return 0;		detach_timer(timer, clear_pending);	if (!tbase_get_deferrable(timer->base)) {		base->active_timers--;		if (timer->expires == base->next_timer)			base->next_timer = base->timer_jiffies;	}	return 1;}
开发者ID:goumuli,项目名称:GridOS,代码行数:14,


示例3: detach_expired_timer

static inline void detach_expired_timer(struct timer_list *timer, struct tvec_base *base){	detach_timer(timer, true);	if (!tbase_get_deferrable(timer->base))		base->active_timers--;}
开发者ID:goumuli,项目名称:GridOS,代码行数:6,



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


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