geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
geopm_error.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef GEOPM_ERROR_H_INCLUDE
7 #define GEOPM_ERROR_H_INCLUDE
8 
9 #include <stdlib.h>
10 
11 #include "geopm_public.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
32 };
33 
34 /*
35  * String length allocated for GEOPM messages (like C error messages
36  * derived from C++ exceptions). Has same value as PATH_MAX from
37  * linux/limits.h for historical reasons.
38  */
39 #define GEOPM_MESSAGE_MAX 4096ULL
40 
41 /* Convert error number into an error message */
42 void GEOPM_PUBLIC
43  geopm_error_message(int err, char *msg, size_t size);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 #endif
void GEOPM_PUBLIC geopm_error_message(int err, char *msg, size_t size)
Definition: Exception.cpp:42
geopm_error_e
Definition: geopm_error.h:17
@ GEOPM_ERROR_DATA_STORE
Definition: geopm_error.h:31
@ GEOPM_ERROR_FILE_PARSE
Definition: geopm_error.h:21
@ GEOPM_ERROR_MSR_OPEN
Definition: geopm_error.h:25
@ GEOPM_ERROR_NO_AGENT
Definition: geopm_error.h:30
@ GEOPM_ERROR_LOGIC
Definition: geopm_error.h:19
@ GEOPM_ERROR_MSR_READ
Definition: geopm_error.h:26
@ GEOPM_ERROR_INVALID
Definition: geopm_error.h:20
@ GEOPM_ERROR_LEVEL_RANGE
Definition: geopm_error.h:22
@ GEOPM_ERROR_AGENT_UNSUPPORTED
Definition: geopm_error.h:28
@ GEOPM_ERROR_RUNTIME
Definition: geopm_error.h:18
@ GEOPM_ERROR_PLATFORM_UNSUPPORTED
Definition: geopm_error.h:24
@ GEOPM_ERROR_AFFINITY
Definition: geopm_error.h:29
@ GEOPM_ERROR_MSR_WRITE
Definition: geopm_error.h:27
@ GEOPM_ERROR_NOT_IMPLEMENTED
Definition: geopm_error.h:23
#define GEOPM_PUBLIC
Definition: geopm_public.h:10