libdvfs  2.0
A light library to set CPU governor and freqency
Macros | Functions
dvfs_error.h File Reference

Definitions of error codes. More...

Go to the source code of this file.

Macros

#define DVFS_SUCCESS   0
 No error.
 
#define DVFS_ERROR_INVALID_ARG   -1
 Invalid argument passed to the function.
 
#define DVFS_ERROR_FILE_ERROR   -2
 File error (use strerrno to have more information)
 
#define DVFS_ERROR_MEM_ALLOC_FAILED   -3
 Memory allocation failed.
 
#define DVFS_ERROR_RELATED_CORE_UNAVAILABLE   -4
 Failed to get related core.
 
#define DVFS_ERROR_SEMAPHORE_FAILURE   -5
 Failure related to semaphore function.
 
#define DVFS_ERROR_BUFFER_TOO_SHORT   -6
 A buffer was not big enough for the operation.
 
#define DVFS_ERROR_SET_FREQ_FILE   -7
 File to set frequency is not available.
 
#define DVFS_ERROR_INVALID_FREQ   -8
 The freq is not available.
 
#define DVFS_ERROR_INVALID_FREQ_ID   -9
 The freq ID is not available.
 
#define DVFS_ERROR_INVALID_CORE_ID   -10
 The core ID is not available.
 
#define DVFS_ERROR_INVALID_INDEX   -11
 The index passed is invalid.
 
#define DVFS_ERROR_CORE_UNIT_MISMATCH   -12
 Core is not findable in this CPU.
 
#define DVFS_ERROR_UNKNOWN   -13
 Unknown error (all greater error code results in this)
 

Functions

const char * dvfs_strerror (int id_error)
 Returns a string describing the error number. More...
 

Detailed Description

Definitions of error codes.

dvfs_strerror allows to return a string describing these errors in a human readable favor.

Function Documentation

const char* dvfs_strerror ( int  id_error)

Returns a string describing the error number.

Parameters
id_errorerror number
Returns
a string describing the error. You don't have to free it.