topology.h
来自「Linux Kernel 2.6.9 for OMAP1710」· C头文件 代码 · 共 65 行
H
65 行
/* * include/linux/topology.h * * Written by: Matthew Dobson, IBM Corporation * * Copyright (C) 2002, IBM Corp. * * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Send feedback to <colpatch@us.ibm.com> */#ifndef _LINUX_TOPOLOGY_H#define _LINUX_TOPOLOGY_H#include <linux/cpumask.h>#include <linux/bitops.h>#include <linux/mmzone.h>#include <linux/smp.h>#include <asm/topology.h>#ifndef nr_cpus_node#define nr_cpus_node(node) \ ({ \ cpumask_t __tmp__; \ __tmp__ = node_to_cpumask(node); \ cpus_weight(__tmp__); \ })#endifstatic inline int __next_node_with_cpus(int node){ do ++node; while (node < numnodes && !nr_cpus_node(node)); return node;}#define for_each_node_with_cpus(node) \ for (node = 0; node < numnodes; node = __next_node_with_cpus(node))#ifndef node_distance#define node_distance(from,to) ((from) != (to))#endif#ifndef PENALTY_FOR_NODE_WITH_CPUS#define PENALTY_FOR_NODE_WITH_CPUS (1)#endif#endif /* _LINUX_TOPOLOGY_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?