libmsr
0.3.0
A friendlier interface to accessing MSRs on Intel platforms
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Macros
Pages
include
libmsr_error.h
Go to the documentation of this file.
1
/* libmsr_error.h
2
*
3
* Copyright (c) 2011-2016, Lawrence Livermore National Security, LLC.
4
* LLNL-CODE-645430
5
*
6
* Produced at Lawrence Livermore National Laboratory
7
* Written by Barry Rountree, rountree@llnl.gov
8
* Scott Walker, walker91@llnl.gov
9
* Kathleen Shoga, shoga1@llnl.gov
10
*
11
* All rights reserved.
12
*
13
* This file is part of libmsr.
14
*
15
* libmsr is free software: you can redistribute it and/or modify it under the
16
* terms of the GNU Lesser General Public License as published by the Free
17
* Software Foundation, either version 3 of the License, or (at your option)
18
* any later version.
19
*
20
* libmsr is distributed in the hope that it will be useful, but WITHOUT ANY
21
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
23
* details.
24
*
25
* You should have received a copy of the GNU Lesser General Public License
26
* along with libmsr. If not, see <http://www.gnu.org/licenses/>.
27
*
28
* This material is based upon work supported by the U.S. Department of
29
* Energy's Lawrence Livermore National Laboratory. Office of Science, under
30
* Award number DE-AC52-07NA27344.
31
*
32
*/
33
34
#ifndef LIBMSR_ERROR_H_INCLUDE
35
#define LIBMSR_ERROR_H_INCLUDE
36
37
#ifdef __cplusplus
38
extern
"C"
{
39
#endif
40
41
#ifndef NAME_MAX
42
#define NAME_MAX 1024
43
#endif
44
46
enum
libmsr_error_e
{
48
LIBMSR_ERROR_RUNTIME
= -1,
51
LIBMSR_ERROR_PLATFORM_NOT_SUPPORTED
= -2,
53
LIBMSR_ERROR_ARRAY_BOUNDS
= -3,
55
LIBMSR_ERROR_MSR_BATCH
= -4,
58
LIBMSR_ERROR_PLATFORM_ENV
= -5,
60
LIBMSR_ERROR_MSR_MODULE
= -6,
62
LIBMSR_ERROR_MSR_OPEN
= -7,
64
LIBMSR_ERROR_MSR_CLOSE
= -8,
66
LIBMSR_ERROR_MSR_READ
= -9,
68
LIBMSR_ERROR_MSR_WRITE
= -10,
70
LIBMSR_ERROR_RAPL_INIT
= -11,
72
LIBMSR_ERROR_MSR_INIT
= -12,
74
LIBMSR_ERROR_INVAL
= -13,
76
LIBMSR_ERROR_NOT_IMPLEMENTED_YET
= -14,
78
LIBMSR_ERROR_MEMORY_ALLOCATION
= -15,
80
LIBMSR_ERROR_CSR_INIT
= -16,
82
LIBMSR_ERROR_CSR_COUNTERS
= -17,
83
};
84
105
void
libmsr_error_handler
(
const
char
*desc,
106
int
err,
107
const
char
*host,
108
const
char
*filename,
109
int
line);
110
118
char
*
get_libmsr_error_message
(
int
err);
119
129
void
libmsr_error_message
(
int
err,
130
char
*msg,
131
size_t
size);
132
133
#ifdef __cplusplus
134
}
135
#endif
136
#endif
Generated by
1.8.2