#include <Mutex.h>
Inheritance diagram for clawsoft::Mutex:
Public Methods | |
Mutex (int autoinit=1) | |
Constructor initialize using default atttributes, this depends on how you compiled the library if you chose GNU Pth then the first argument is meaningfull. | |
~Mutex () | |
This destructor calls dastroy to ensure that all the resources used by the Mutex all released automagically. | |
void | init () |
Initializer, use in case of not using the default constructor (this interface is provided for future compatibility). | |
void | lock () |
Use this to lock the mutex explicitely. | |
void | unlock () |
Use this to unlock the mutex explicitely. | |
const char * | getClassName () |
Returns the name of the current class. | |
Static Public Methods | |
int | installedCPUs () |
This will return how many CPUs are installed in the system. | |
double | cpuSpeed () |
This will return the CPU speed in megahertz. | |
int | totalMemory () |
Will return the total amount of system memory. | |
int | freeMemory () |
Will return the total amount of free system memory. | |
void | usleep (Uint32 usec) |
Will freeze the software for usec microseconds. | |
Data Fields | |
pthread_mutex_t | mutex |
The mutex object itself as defined by POSIX Threads GNU Pth or SDL. | |
Protected Methods | |
void | setClassName (const char *n) |
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging. | |
Private Methods | |
void | destroy () |
Destroys the current mutex, freeing all the resources allocated by it. |
|
Constructor initialize using default atttributes, this depends on how you compiled the library if you chose GNU Pth then the first argument is meaningfull.
|
|
This destructor calls dastroy to ensure that all the resources used by the Mutex all released automagically.
|
|
This will return the CPU speed in megahertz.
|
|
Destroys the current mutex, freeing all the resources allocated by it.
|
|
Will return the total amount of free system memory.
|
|
Returns the name of the current class.
|
|
Initializer, use in case of not using the default constructor (this interface is provided for future compatibility).
|
|
This will return how many CPUs are installed in the system.
|
|
Use this to lock the mutex explicitely.
|
|
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.
|
|
Will return the total amount of system memory.
|
|
Use this to unlock the mutex explicitely.
|
|
Will freeze the software for usec microseconds.
|
|
The mutex object itself as defined by POSIX Threads GNU Pth or SDL.
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: