LIKWID
Classes | Typedefs | Functions
Config file module

Classes

struct  Likwid_Configuration
 Structure holding values of the configuration file. More...
 

Typedefs

typedef Likwid_ConfigurationConfiguration_t
 Pointer for exporting the Configuration data structure.
 

Functions

int config_setGroupPath (const char *path) __attribute__((visibility("default")))
 Set group path in the config struction. More...
 
int destroy_configuration (void) __attribute__((visibility("default")))
 Destroy the config structure. More...
 
Configuration_t get_configuration (void) __attribute__((visibility("default")))
 Retrieve the config structure. More...
 
int init_configuration (void) __attribute__((visibility("default")))
 Read the config file of LIKWID, if it exists. More...
 

Detailed Description

Function Documentation

int config_setGroupPath ( const char *  path)

Set group path in the config struction.

Set group path in the config struction. The path must be a directory.

Parameters
[in]path
Returns
error code (0 for success, -ENOMEM if reallocation failed, -ENOTDIR if no directoy)
int destroy_configuration ( void  )

Destroy the config structure.

Destroys the current config structure and frees all allocated memory for path names

Returns
error code (0 for success, -EFAULT if config structure not initialized)
Configuration_t get_configuration ( void  )

Retrieve the config structure.

Get the initialized configuration

See also
Configuration_t
Returns
Configuration_t (pointer to internal Configuration structure)
int init_configuration ( void  )

Read the config file of LIKWID, if it exists.

Search for LIKWID config file and read the values in Currently the paths /usr/local/etc/likwid.cfg, /etc/likwid.cfg and the path defined in config.mk are checked.

Returns
error code (0 for success, -EFAULT if no file can be found)