CPU Class Reference

class representing a generic CPU More...

#include <cpu.h>

Inheritance diagram for CPU:

CPUFreq_Interface CPUFreq_Kernel CPUFreq_Userspace List of all members.

Public Member Functions

 CPU (int id)
 constructor
int enable ()
 set a CPU online
int disable ()
 set a CPU offline
bool online ()
 if the CPU is online
bool hotpluggable ()
 if the CPU can be offlined and onlined

Static Public Member Functions

static int enableAll ()
 enables all CPUs in system

Protected Attributes

int _cpu_base
 Stores which CPU this object corresponds to.

Private Attributes

std::string ONLINE_FILE
 filename for CPU hotplugging

Detailed Description

class representing a generic CPU


Constructor & Destructor Documentation

CPU::CPU int  id  ) 
 

constructor

Parameters:
id the CPU is starting from 0


Member Function Documentation

int CPU::disable  ) 
 

set a CPU offline

CPU 0 can't be offlined

Parameters:
cpu number of CPU starting from 1
Return values:
< 0 error setting CPU offline
0 CPU CPU already offline
> 0 successfully offlined CPU

int CPU::enable  ) 
 

set a CPU online

CPU 0 can't be offlined

Parameters:
cpu number of CPU starting from 1
Return values:
< 0 error setting CPU online
0 CPU CPU already online
> 0 successfully onlined CPU

int CPU::enableAll  )  [static]
 

enables all CPUs in system

Returns:
number of hotpluggable CPUs

bool CPU::hotpluggable  ) 
 

if the CPU can be offlined and onlined

Returns:
true if hotpluggable, false otherwise

bool CPU::online  ) 
 

if the CPU is online

Returns:
true if CPU is online, false otherwise


Member Data Documentation

int CPU::_cpu_base [protected]
 

Stores which CPU this object corresponds to.

std::string CPU::ONLINE_FILE [private]
 

filename for CPU hotplugging


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 09:27:19 2006 for Powersave Daemon by  doxygen 1.4.6