22 #include <semaphore.h>
int dvfs_core_get_freq(const dvfs_core *core, unsigned int *pFreq, unsigned int freq_id)
Gets the frequency currently set for the core.
Definition: dvfs_core.c:460
unsigned int nb_freqs
Number of frequencies available for this core.
Definition: dvfs_core.h:38
int dvfs_core_get_current_freq(const dvfs_core *core, unsigned int *pFreq)
Gets the frequency currently set for the core.
Definition: dvfs_core.c:442
unsigned int init_freq
Freqency used when core get initialised.
Definition: dvfs_core.h:45
int dvfs_core_set_gov(const dvfs_core *core, const char *gov)
Changes the governor on the given core.
Definition: dvfs_core.c:352
unsigned int * freqs
Available frequencies for this core, sorted by increasing order.
Definition: dvfs_core.h:39
int dvfs_core_get_gov(const dvfs_core *core, char *buf, size_t buf_len)
Sets the current DVFS governor on the given core to the given buffer.
Definition: dvfs_core.c:317
unsigned int id
Core id as declared by Linux.
Definition: dvfs_core.h:37
int dvfs_core_open(dvfs_core **ppCore, unsigned int id, bool seq)
Opens the Core context for the given core ID.
Definition: dvfs_core.c:201
int dvfs_core_get_id(const dvfs_core *core, unsigned int *pID)
Gets the ID of the DVFS core.
Definition: dvfs_core.c:489
int dvfs_core_set_freq(const dvfs_core *core, unsigned int freq)
Sets the frequency for the given core.
Definition: dvfs_core.c:395
FILE * fd_getf
Descriptor toward the cur_freq file.
Definition: dvfs_core.h:42
sem_t * sem
Semaphore for sequentialization.
Definition: dvfs_core.h:47
Represents on core.
Definition: dvfs_core.h:36
int dvfs_core_get_nb_freqs(const dvfs_core *core, unsigned int *pNbFreq)
Gets the number of frequencies available for the core.
Definition: dvfs_core.c:477
FILE * fd_setf
File descriptor toward the set_speed file.
Definition: dvfs_core.h:41
int dvfs_core_close(dvfs_core *core)
Closes properly an opened Core context.
Definition: dvfs_core.c:279