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

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

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

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

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

示例1: init_cpu_present

void init_cpu_present(const struct cpumask *src){	cpumask_copy(to_cpumask(cpu_present_bits), src);}
开发者ID:lbdroid,项目名称:bricked-mako,代码行数:4,


示例2: init_cpu_online

void init_cpu_online(const struct cpumask *src){	cpumask_copy(to_cpumask(cpu_online_bits), src);}
开发者ID:engine95,项目名称:navelC-990,代码行数:4,


示例3: MASK_DECLARE_8

	MASK_DECLARE_8(32),	MASK_DECLARE_8(40),	MASK_DECLARE_8(48),	MASK_DECLARE_8(56),#endif};EXPORT_SYMBOL_GPL(cpu_bit_bitmap);const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;EXPORT_SYMBOL(cpu_all_bits);#ifdef CONFIG_INIT_ALL_POSSIBLEstatic DECLARE_BITMAP(cpu_possible_bits, CONFIG_NR_CPUS) __read_mostly	= CPU_BITS_ALL;#elsestatic DECLARE_BITMAP(cpu_possible_bits, CONFIG_NR_CPUS) __read_mostly;#endifconst struct cpumask *const cpu_possible_mask = to_cpumask(cpu_possible_bits);EXPORT_SYMBOL(cpu_possible_mask);static DECLARE_BITMAP(cpu_online_bits, CONFIG_NR_CPUS) __read_mostly;const struct cpumask *const cpu_online_mask = to_cpumask(cpu_online_bits);EXPORT_SYMBOL(cpu_online_mask);static DECLARE_BITMAP(cpu_present_bits, CONFIG_NR_CPUS) __read_mostly;const struct cpumask *const cpu_present_mask = to_cpumask(cpu_present_bits);EXPORT_SYMBOL(cpu_present_mask);static DECLARE_BITMAP(cpu_active_bits, CONFIG_NR_CPUS) __read_mostly;const struct cpumask *const cpu_active_mask = to_cpumask(cpu_active_bits);EXPORT_SYMBOL(cpu_active_mask);void set_cpu_possible(unsigned int cpu, bool possible)
开发者ID:lbdroid,项目名称:bricked-mako,代码行数:31,


示例4: to_cpumask

struct cpumask *tick_get_broadcast_mask(void){	return to_cpumask(tick_broadcast_mask);}
开发者ID:AbheekG,项目名称:XIA-for-Linux,代码行数:4,


示例5: init_cpu_possible

void init_cpu_possible(const struct cpumask *src){	cpumask_copy(to_cpumask(cpu_possible_bits), src);}
开发者ID:engine95,项目名称:navelC-990,代码行数:4,


示例6: exit_round_robin

static void exit_round_robin(unsigned int tsk_index){	struct cpumask *pad_busy_cpus = to_cpumask(pad_busy_cpus_bits);	cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus);	tsk_in_cpu[tsk_index] = -1;}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:6,


示例7: acpi_pad_idlecpus_show

static ssize_t acpi_pad_idlecpus_show(struct device *dev,	struct device_attribute *attr, char *buf){	return cpumask_scnprintf(buf, PAGE_SIZE,		to_cpumask(pad_busy_cpus_bits));}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:6,


示例8: vmm_init_cpu_possible

void vmm_init_cpu_possible(const struct vmm_cpumask *src){	vmm_cpumask_copy(to_cpumask(cpu_possible_bits), src);}
开发者ID:32bitmicro,项目名称:xvisor,代码行数:4,


示例9: vmm_init_cpu_online

void vmm_init_cpu_online(const struct vmm_cpumask *src){	vmm_cpumask_copy(to_cpumask(cpu_online_bits), src);}
开发者ID:32bitmicro,项目名称:xvisor,代码行数:4,


示例10: tegra_secondary_startup

#include <mach/iomap.h>#include "power.h"extern void tegra_secondary_startup(void);static DEFINE_SPINLOCK(boot_lock);static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);#ifdef CONFIG_HOTPLUG_CPUstatic DEFINE_PER_CPU(struct completion, cpu_killed);extern void tegra_hotplug_startup(void);#endifstatic DECLARE_BITMAP(cpu_init_bits, CONFIG_NR_CPUS) __read_mostly;const struct cpumask *const cpu_init_mask = to_cpumask(cpu_init_bits);#define cpu_init_map (*(cpumask_t *)cpu_init_mask)#define EVP_CPU_RESET_VECTOR /	(IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100)#define CLK_RST_CONTROLLER_CLK_CPU_CMPLX /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x4c)#define CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x340)#define CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344)void __cpuinit platform_secondary_init(unsigned int cpu){	trace_hardirqs_off();	gic_cpu_init(0, IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x100);
开发者ID:MarkLuk,项目名称:TF101-kernelOC,代码行数:31,


示例11: vmm_init_cpu_present

void vmm_init_cpu_present(const struct vmm_cpumask *src){	vmm_cpumask_copy(to_cpumask(cpu_present_bits), src);}
开发者ID:32bitmicro,项目名称:xvisor,代码行数:4,


示例12: nmi_watchdog_tick

notrace __kprobes intnmi_watchdog_tick(struct pt_regs *regs, unsigned reason){	/*	 * Since current_thread_info()-> is always on the stack, and we	 * always switch the stack NMI-atomically, it's safe to use	 * smp_processor_id().	 */	unsigned int sum;	int touched = 0;	int cpu = smp_processor_id();	int rc = 0;	sum = get_timer_irqs(cpu);	if (__get_cpu_var(nmi_touch)) {		__get_cpu_var(nmi_touch) = 0;		touched = 1;	}	/* We can be called before check_nmi_watchdog, hence NULL check. */	if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {		static DEFINE_RAW_SPINLOCK(lock); /* Serialise the printks */		raw_spin_lock(&lock);		printk(KERN_WARNING "NMI backtrace for cpu %d/n", cpu);		show_regs(regs);		dump_stack();		raw_spin_unlock(&lock);		cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask));		rc = 1;	}	/* Could check oops_in_progress here too, but it's safer not to */	if (mce_in_progress())		touched = 1;	/* if the none of the timers isn't firing, this cpu isn't doing much */	if (!touched && __get_cpu_var(last_irq_sum) == sum) {		/*		 * Ayiee, looks like this CPU is stuck ...		 * wait a few IRQs (5 seconds) before doing the oops ...		 */		__this_cpu_inc(alert_counter);		if (__this_cpu_read(alert_counter) == 5 * nmi_hz)			/*			 * die_nmi will return ONLY if NOTIFY_STOP happens..			 */			die_nmi("BUG: NMI Watchdog detected LOCKUP",				regs, panic_on_timeout);	} else {		__get_cpu_var(last_irq_sum) = sum;		__this_cpu_write(alert_counter, 0);	}	/* see if the nmi watchdog went off */	if (!__get_cpu_var(wd_enabled))		return rc;	switch (nmi_watchdog) {	case NMI_LOCAL_APIC:		rc |= lapic_wd_event(nmi_hz);		break;	case NMI_IO_APIC:		/*		 * don't know how to accurately check for this.		 * just assume it was a watchdog timer interrupt		 * This matches the old behaviour.		 */		rc = 1;		break;	}	return rc;}
开发者ID:Adjustxx,项目名称:Savaged-Zen,代码行数:74,


示例13: acpi_pad_idlecpus_show

static ssize_t acpi_pad_idlecpus_show(struct device *dev,	struct device_attribute *attr, char *buf){	return cpumap_print_to_pagebuf(false, buf,				       to_cpumask(pad_busy_cpus_bits));}
开发者ID:DenisLug,项目名称:mptcp,代码行数:6,


示例14: local_ipi

static void __init local_ipi(void){	cpumask_clear(to_cpumask(nmi_ipi_mask));	cpumask_set_cpu(smp_processor_id(), to_cpumask(nmi_ipi_mask));	test_nmi_ipi(to_cpumask(nmi_ipi_mask));}
开发者ID:AllenWeb,项目名称:linux,代码行数:6,


示例15: DECLARE_BITMAP

#include <linux/smp.h>#include <linux/delay.h>#include <linux/clk.h>#include <linux/cpumask.h>#include <asm/cputype.h>#include <asm/smp_plat.h>#include <asm/soc.h>#include <linux/platform/tegra/common.h>#include <linux/platform/tegra/reset.h>#include "pm-soc.h"static DECLARE_BITMAP(tegra_cpu_power_up_by_fc, CONFIG_NR_CPUS) __read_mostly;static struct cpumask *tegra_cpu_power_mask =				to_cpumask(tegra_cpu_power_up_by_fc);#define tegra_cpu_power_map	(*(cpumask_t *)tegra_cpu_power_mask)static void __init tegra_smp_prepare_cpus(unsigned int max_cpus){	/* Always mark the boot CPU as initially powered up */	cpumask_set_cpu(0, tegra_cpu_power_mask);}void (*tegra_boot_secondary_cpu)(int cpu);static int tegra_boot_secondary(unsigned int cpu, struct task_struct *idle){	BUG_ON(cpu == raw_smp_processor_id());	if (tegra_boot_secondary_cpu) {
开发者ID:1ee7,项目名称:linux_l4t_tx1,代码行数:31,


示例16: DECLARE_BITMAP

#include <asm/hardware/gic.h>#include <asm/smp_scu.h>#include <mach/iomap.h>#include <mach/powergate.h>#include "pm.h"#include "clock.h"#include "reset.h"#include "sleep.h"bool tegra_all_cpus_booted;static DECLARE_BITMAP(tegra_cpu_init_bits, CONFIG_NR_CPUS) __read_mostly;const struct cpumask *const tegra_cpu_init_mask = to_cpumask(tegra_cpu_init_bits);#define tegra_cpu_init_map	(*(cpumask_t *)tegra_cpu_init_mask)#define CLK_RST_CONTROLLER_CLK_CPU_CMPLX /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x4c)#define CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x340)#define CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344)#define CPU_CLOCK(cpu)	(0x1<<(8+cpu))#define CPU_RESET(cpu)	(0x1111ul<<(cpu))#ifndef CONFIG_ARCH_TEGRA_2x_SOC#define CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR /	(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x34c)
开发者ID:AAccount,项目名称:android_kernel_samsung_p4,代码行数:30,



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


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