blob: f333736a61d02e349745044b4c0cd57f993e0cde [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#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>
Ben Cheng4b29af02012-03-07 16:14:53 -080021
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022struct 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};
Ben Cheng4b29af02012-03-07 16:14:53 -080032
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080033struct kernel_stat {
34 struct cpu_usage_stat cpustat;
35 unsigned int irqs[NR_IRQS];
36};
Ben Cheng4b29af02012-03-07 16:14:53 -080037
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080038#define kstat_cpu(cpu) per_cpu(kstat, cpu)
Ben Cheng4b29af02012-03-07 16:14:53 -080039
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080040#define kstat_this_cpu __get_cpu_var(kstat)
Ben Cheng4b29af02012-03-07 16:14:53 -080041
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#endif