本文整理汇总了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;
}
示例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);
}
示例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;
}
示例4: process_notifier_register
int process_notifier_register(struct notifier_block *nb)
{
int result;
unsigned long flags;
write_lock_irqsave(¬ifier_lock, flags);
result = raw_notifier_chain_register(¬ifier_list, nb);
write_unlock_irqrestore(¬ifier_lock, flags);
return result;
}
示例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;
}
示例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;
}
示例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;
}
示例8: register_modem_state_notifier
int register_modem_state_notifier(struct notifier_block *nb)
{
return raw_notifier_chain_register(&modem_state_chain, nb);
}
示例9: xen_resume_notifier_register
void xen_resume_notifier_register(struct notifier_block *nb)
{
raw_notifier_chain_register(&xen_resume_notifier, nb);
}
示例10: register_busfreq_notifier
int register_busfreq_notifier(struct notifier_block *nb)
{
return raw_notifier_chain_register(&busfreq_notifier_chain, nb);
}
示例11: register_proc_cpuinfo_notifier
int __ref register_proc_cpuinfo_notifier(struct notifier_block *nb)
{
return raw_notifier_chain_register(&proc_cpuinfo_chain, nb);
}
示例12: __register_cpu_notifier
int __ref __register_cpu_notifier(struct notifier_block *nb)
{
return raw_notifier_chain_register(&cpu_chain, nb);
}
示例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);
}
示例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);
}
示例15: register_listen_notifier
static void register_listen_notifier(struct notifier_block *nb)
{
mutex_lock(¬ify_mutex);
raw_notifier_chain_register(&listen_notify_list, nb);
mutex_unlock(¬ify_mutex);
}