1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _LINUX_KERNEL_STAT_H 13 #define _LINUX_KERNEL_STAT_H 14 15 #include <asm/irq.h> 16 #include <linux/smp.h> 17 #include <linux/threads.h> 18 #include <linux/percpu.h> 19 #include <linux/cpumask.h> 20 #include <asm/cputime.h> 21 22 struct cpu_usage_stat { 23 cputime64_t user; 24 cputime64_t nice; 25 cputime64_t system; 26 cputime64_t softirq; 27 cputime64_t irq; 28 cputime64_t idle; 29 cputime64_t iowait; 30 cputime64_t steal; 31 }; 32 33 struct kernel_stat { 34 struct cpu_usage_stat cpustat; 35 unsigned int irqs[NR_IRQS]; 36 }; 37 38 #define kstat_cpu(cpu) per_cpu(kstat, cpu) 39 40 #define kstat_this_cpu __get_cpu_var(kstat) 41 42 #endif 43