📄 procfs.c
字号:
/* * arch/v850/kernel/procfs.c -- Introspection functions for /proc filesystem * * Copyright (C) 2001,2002 NEC Corporation * Copyright (C) 2001,2002 Miles Bader <miles@gnu.org> * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this * archive for more details. * * Written by Miles Bader <miles@gnu.org> */#include "mach.h"static int cpuinfo_print (struct seq_file *m, void *v){ extern unsigned long loops_per_jiffy; return seq_printf (m, "CPU-Family: v850\n" "CPU-Arch: %s\n" "CPU-Model: %s\n" "BogoMips: %lu.%02lu\n", CPU_ARCH, CPU_MODEL, loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100);}static void *cpuinfo_start (struct seq_file *m, loff_t *pos){ return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL;}static void *cpuinfo_next (struct seq_file *m, void *v, loff_t *pos){ ++*pos; return cpuinfo_start (m, pos);}static void cpuinfo_stop (struct seq_file *m, void *v){}struct seq_operations cpuinfo_op = { start: cpuinfo_start, next: cpuinfo_next, stop: cpuinfo_stop, show: cpuinfo_print};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -