libsysactivity
0.6.4
Main Page
Related Pages
Modules
Data Structures
All
Data Structures
Functions
Variables
Enumerations
Enumerator
Groups
Pages
src
common
cpu.h
1
/*
2
* libsysactivity
3
* http://sourceforge.net/projects/libsysactivity/
4
* Copyright (c) 2009-2011 Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
25
#ifndef SA_CPU_H_
26
#define SA_CPU_H_
27
31
SA_EXPORT
struct
sa_cpu
{
32
#ifdef SA_CPU_ID
33
uint16_t
id
;
34
#endif
35
#ifdef SA_CPU_USER
36
float
user
;
37
#endif
38
#ifdef SA_CPU_NICE
39
float
nice
;
40
#endif
41
#ifdef SA_CPU_SYSTEM
42
float
system
;
43
#endif
44
#ifdef SA_CPU_IDLE
45
float
idle
;
46
#endif
47
#ifdef SA_CPU_WAITING_FOR_IO
48
float
waiting_for_io
;
49
#endif
50
#ifdef SA_CPU_HARDWARE_IRQ
51
float
hardware_irq
;
52
#endif
53
#ifdef SA_CPU_SOFTWARE_IRQ
54
float
software_irq
;
55
#endif
56
#ifdef SA_CPU_STOLEN
57
float
stolen
;
58
#endif
59
#ifdef SA_CPU_INTR
60
float
intr;
61
#endif
62
};
63
64
#ifdef SA_OPEN_CPU
65
70
int
sa_open_cpu
(
void
) SA_EXPORT;
71
#endif
72
73
#ifdef SA_CLOSE_CPU
74
79
int
sa_close_cpu
(
void
) SA_EXPORT;
80
#endif
81
87
int
sa_reset_cpus
() SA_EXPORT;
88
95
int
sa_count_cpus
(uint16_t* number) SA_EXPORT SA_NONNULL;
96
105
int
sa_get_cpu
(uint16_t index, struct
sa_cpu
* dst) SA_EXPORT SA_NONNULL;
106
116
int
sa_get_cpus
(struct
sa_cpu
* dst, uint16_t dst_size, uint16_t* written) SA_EXPORT SA_NONNULL;
117
119
#endif
/* SA_CPU_H_ */
Generated on Sat Nov 3 2012 13:04:31 for libsysactivity by
1.8.1.2