Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
system.h File Reference
#include "parse.h"

Go to the source code of this file.

Functions

long long get_time ()
 
int set_cpufreq_governor (char *governor, unsigned int cpu)
 
int set_cpu_affinity (unsigned int cpu)
 
int set_process_priority (int priority)
 
void prepare_user (const struct config *config)
 
void prepare_system (const struct config *config)
 

Function Documentation

long long get_time ( void  )

returns time since epoch in µs

Return values
time

Definition at line 39 of file system.c.

void prepare_system ( const struct config config)

sets up the cpu affinity and scheduler priority

Parameters
configbenchmark config values

Definition at line 164 of file system.c.

void prepare_user ( const struct config config)

notifies the user that the benchmark may run some time

Parameters
configbenchmark config values

Definition at line 138 of file system.c.

int set_cpu_affinity ( unsigned int  cpu)

sets cpu affinity for the process

Parameters
cpucpu# to which the affinity should be set
Return values
0on success
-1when setting the affinity failed

Definition at line 87 of file system.c.

int set_cpufreq_governor ( char governor,
unsigned int  cpu 
)

sets the cpufreq governor

Parameters
governorcpufreq governor name
cpucpu for which the governor should be set
Return values
0on success
-1when failed

Definition at line 58 of file system.c.

int set_process_priority ( int  priority)

sets the process priority parameter

Parameters
prioritypriority value
Return values
0on success
-1when setting the priority failed

Definition at line 114 of file system.c.