当前位置: 首页>>代码示例>>C++>>正文


C++ raw_notifier_chain_register函数代码示例

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


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

示例1: register_cpu_notifier

/* Need to know about CPUs going up/down? */
int __ref register_cpu_notifier(struct notifier_block *nb)
{
	int ret;

#ifdef MTK_CPU_HOTPLUG_DEBUG
	static int index = 0;
 #ifdef CONFIG_KALLSYMS
	char namebuf[128] = {0};
	const char *symname;
	
	symname = kallsyms_lookup((unsigned long)nb->notifier_call, NULL, NULL, NULL, namebuf);
	if (symname) 
		printk("[cpu_ntf] <%02d>%08lx (%s)\n", index++, (unsigned long)nb->notifier_call, symname);
	else
		printk("[cpu_ntf] <%02d>%08lx\n", index++, (unsigned long)nb->notifier_call);
 #else //#ifdef CONFIG_KALLSYMS
	printk("[cpu_ntf] <%02d>%08lx\n", index++, (unsigned long)nb->notifier_call);
 #endif //#ifdef CONFIG_KALLSYMS
#endif //#ifdef MTK_CPU_HOTPLUG_DEBUG

	cpu_maps_update_begin();
	ret = raw_notifier_chain_register(&cpu_chain, nb);
	cpu_maps_update_done();
	return ret;
}
开发者ID:Banjo0917,项目名称:mt6577_kernel3.4,代码行数:26,代码来源:cpu.c

示例2: ipcs_cp_notifier_register

void ipcs_cp_notifier_register(struct notifier_block *nb)
{
	/* lock serializes against cp_running value changing */
	spin_lock_bh(&cp_state_notifier_lock);
	raw_notifier_chain_register(&cp_state_notifier_list, nb);
	if (cp_running && nb != NULL)
		nb->notifier_call(nb, IPC_CPSTATE_RUNNING, NULL);
	spin_unlock_bh(&cp_state_notifier_lock);
}
开发者ID:Alonso1398,项目名称:android_kernel_samsung_coriplus,代码行数:9,代码来源:ipc_server.c

示例3: tegra_register_simon_notifier

/*
 * Grade notification chain
 */
int tegra_register_simon_notifier(struct notifier_block *nb)
{
	int ret;

	mutex_lock(&simon_lock);
	ret = raw_notifier_chain_register(&simon_nh, nb);
	mutex_unlock(&simon_lock);
	return ret;
}
开发者ID:Jetson-TK1-AndroidTV,项目名称:android_kernel_nvidia_aosp,代码行数:12,代码来源:tegra_simon.c

示例4: process_notifier_register

int process_notifier_register(struct notifier_block *nb)
{
	int result;
	unsigned long flags;

	write_lock_irqsave(&notifier_lock, flags);
	result = raw_notifier_chain_register(&notifier_list, nb);
	write_unlock_irqrestore(&notifier_lock, flags);
	return result;
}
开发者ID:giraldeau,项目名称:Linux-Sensor,代码行数:10,代码来源:process_notify.c

示例5: clockevents_register_notifier

/**
 * clockevents_register_notifier - register a clock events change listener
 */
int clockevents_register_notifier(struct notifier_block *nb)
{
	unsigned long flags;
	int ret;

	raw_spin_lock_irqsave(&clockevents_lock, flags);
	ret = raw_notifier_chain_register(&clockevents_chain, nb);
	raw_spin_unlock_irqrestore(&clockevents_lock, flags);

	return ret;
}
开发者ID:djmax81,项目名称:Suemax-kernel_Exynos5433_BASIC_MM,代码行数:14,代码来源:clockevents.c

示例6: cpu_pm_register_notifier

int cpu_pm_register_notifier(struct notifier_block *nb)
{
	unsigned long flags;
	int ret;

	write_lock_irqsave(&cpu_pm_notifier_lock, flags);
	ret = raw_notifier_chain_register(&cpu_pm_notifier_chain, nb);
	write_unlock_irqrestore(&cpu_pm_notifier_lock, flags);

	return ret;
}
开发者ID:0709oNEY,项目名称:at100-kernel,代码行数:11,代码来源:cpu_pm.c

示例7: modem_register_notifier

/*
 *  register a modem events change listener
 */
int modem_register_notifier(struct notifier_block *nb)
{
	int ret = -ENODEV;
	unsigned long flags;

    if(vmdata){
	    raw_spin_lock_irqsave(&rslock, flags);
	    ret = raw_notifier_chain_register(&vmdata->ntf, nb);
	    raw_spin_unlock_irqrestore(&rslock, flags);
    }
	return ret;
}
开发者ID:AwaisKing,项目名称:mt6577_aosp_source,代码行数:15,代码来源:power.c

示例8: register_modem_state_notifier

int register_modem_state_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&modem_state_chain, nb);
}
开发者ID:qkdang,项目名称:m462,代码行数:4,代码来源:modem_state_notify.c

示例9: xen_resume_notifier_register

void xen_resume_notifier_register(struct notifier_block *nb)
{
	raw_notifier_chain_register(&xen_resume_notifier, nb);
}
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:4,代码来源:manage.c

示例10: register_busfreq_notifier

int register_busfreq_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&busfreq_notifier_chain, nb);
}
开发者ID:gvdglind,项目名称:Pluto_UbuntuBuild,代码行数:4,代码来源:busfreq-imx.c

示例11: register_proc_cpuinfo_notifier

int __ref register_proc_cpuinfo_notifier(struct notifier_block *nb)
{
    return raw_notifier_chain_register(&proc_cpuinfo_chain, nb);
}
开发者ID:andy-padavan,项目名称:rt-n56u,代码行数:4,代码来源:proc.c

示例12: __register_cpu_notifier

int __ref __register_cpu_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&cpu_chain, nb);
}
开发者ID:borkmann,项目名称:kasan,代码行数:4,代码来源:cpu.c

示例13: blocking_notifier_chain_register

int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
                                     struct notifier_block *n)
{
	return raw_notifier_chain_register((struct raw_notifier_head *)nh, n);
}
开发者ID:javigon,项目名称:genode,代码行数:5,代码来源:lxc_emul.c

示例14: dsa_switch_register_notifier

int dsa_switch_register_notifier(struct dsa_switch *ds)
{
	ds->nb.notifier_call = dsa_switch_event;

	return raw_notifier_chain_register(&ds->dst->nh, &ds->nb);
}
开发者ID:asmalldev,项目名称:linux,代码行数:6,代码来源:switch.c

示例15: register_listen_notifier

static void register_listen_notifier(struct notifier_block *nb)
{
	mutex_lock(&notify_mutex);
	raw_notifier_chain_register(&listen_notify_list, nb);
	mutex_unlock(&notify_mutex);
}
开发者ID:CCNITSilchar,项目名称:linux,代码行数:6,代码来源:chtls_main.c


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