System.h File Reference

#include <sys/mman.h>
#include <dlfcn.h>
#include <cmath>

Include dependency graph for System.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MLOCK(a, b)   ::mlock((a),(b))
#define MUNLOCK(a, b)   (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0)
#define MUNLOCK_SAMPLEBLOCK(a)   do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);
#define DLOPEN(a, b)   dlopen((a).toStdString().c_str(),(b))
#define DLSYM(a, b)   dlsym((a),(b))
#define DLCLOSE(a)   dlclose((a))
#define DLERROR()   dlerror()
#define PLUGIN_GLOB   "*.so"
#define PATH_SEPARATOR   ':'
#define DEFAULT_LADSPA_PATH   "$HOME/ladspa:$HOME/.ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa"
#define DEFAULT_DSSI_PATH   "$HOME/dssi:$HOME/.dssi:/usr/local/lib/dssi:/usr/lib/dssi"
#define MUNLOCKALL()   ::munlockall()

Enumerations

enum  ProcessStatus { ProcessRunning, ProcessNotRunning, UnknownProcessStatus }

Functions

ProcessStatus GetProcessStatus (int pid)
void GetRealMemoryMBAvailable (int &available, int &total)
int GetDiscSpaceMBAvailable (const char *path)
void StoreStartupLocale ()
void RestoreStartupLocale ()
double mod (double x, double y)
float modf (float x, float y)
double princarg (double a)
float princargf (float a)


Define Documentation

#define MLOCK ( a,
 )     ::mlock((a),(b))

Definition at line 66 of file System.h.

Referenced by RingBuffer< T, N >::mlock(), and RingBuffer< T, N >::resize().

#define MUNLOCK ( a,
 )     (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0)

Definition at line 67 of file System.h.

Referenced by MatrixFile::primeCache(), RingBuffer< T, N >::resize(), FFTMemoryCache::resize(), WaveFileModel::RangeCacheFillThread::run(), and RingBuffer< T, N >::~RingBuffer().

#define MUNLOCK_SAMPLEBLOCK (  )     do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);

Definition at line 68 of file System.h.

Referenced by CodedAudioFileReader::pushBuffer().

#define DLOPEN ( a,
 )     dlopen((a).toStdString().c_str(),(b))

Definition at line 73 of file System.h.

Referenced by LADSPAPluginFactory::discoverPlugins(), DSSIPluginFactory::discoverPlugins(), FeatureExtractionPluginFactory::getPluginIdentifiers(), FeatureExtractionPluginFactory::instantiatePlugin(), and LADSPAPluginFactory::loadLibrary().

#define DLSYM ( a,
 )     dlsym((a),(b))

Definition at line 74 of file System.h.

Referenced by LADSPAPluginFactory::discoverPlugins(), DSSIPluginFactory::discoverPlugins(), DSSIPluginFactory::getDSSIDescriptor(), LADSPAPluginFactory::getLADSPADescriptor(), FeatureExtractionPluginFactory::getPluginIdentifiers(), and FeatureExtractionPluginFactory::instantiatePlugin().

#define DLCLOSE (  )     dlclose((a))

Definition at line 75 of file System.h.

Referenced by FeatureExtractionPluginFactory::getPluginIdentifiers(), FeatureExtractionPluginFactory::instantiatePlugin(), FeatureExtractionPluginFactory::pluginDeleted(), and LADSPAPluginFactory::unloadLibrary().

 
#define DLERROR (  )     dlerror()

Definition at line 76 of file System.h.

Referenced by LADSPAPluginFactory::discoverPlugins(), DSSIPluginFactory::discoverPlugins(), FeatureExtractionPluginFactory::getPluginIdentifiers(), FeatureExtractionPluginFactory::instantiatePlugin(), and LADSPAPluginFactory::loadLibrary().

#define PLUGIN_GLOB   "*.so"

Definition at line 90 of file System.h.

Referenced by LADSPAPluginFactory::discoverPlugins(), FeatureExtractionPluginFactory::findPluginFile(), FeatureExtractionPluginFactory::getPluginIdentifiers(), and LADSPAPluginFactory::loadLibrary().

#define PATH_SEPARATOR   ':'

Definition at line 91 of file System.h.

Referenced by LADSPAPluginFactory::getPluginPath(), and DSSIPluginFactory::getPluginPath().

#define DEFAULT_LADSPA_PATH   "$HOME/ladspa:$HOME/.ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa"

Definition at line 93 of file System.h.

Referenced by LADSPAPluginFactory::getPluginPath().

#define DEFAULT_DSSI_PATH   "$HOME/dssi:$HOME/.dssi:/usr/local/lib/dssi:/usr/lib/dssi"

Definition at line 94 of file System.h.

Referenced by DSSIPluginFactory::getPluginPath().

 
#define MUNLOCKALL (  )     ::munlockall()

Definition at line 96 of file System.h.

Referenced by AudioJACKTarget::AudioJACKTarget().


Enumeration Type Documentation

enum ProcessStatus

Enumerator:
ProcessRunning 
ProcessNotRunning 
UnknownProcessStatus 

Definition at line 102 of file System.h.


Function Documentation

ProcessStatus GetProcessStatus ( int  pid  ) 

Definition at line 76 of file System.cpp.

References ProcessNotRunning, ProcessRunning, and UnknownProcessStatus.

Referenced by TempDirectory::cleanupAbandonedDirectories().

void GetRealMemoryMBAvailable ( int &  available,
int &  total 
)

Definition at line 118 of file System.cpp.

Referenced by StorageAdviser::recommend().

int GetDiscSpaceMBAvailable ( const char *  path  ) 

Definition at line 239 of file System.cpp.

Referenced by StorageAdviser::recommend().

void StoreStartupLocale (  ) 

Definition at line 272 of file System.cpp.

Referenced by main().

void RestoreStartupLocale (  ) 

Definition at line 281 of file System.cpp.

Referenced by RealTimePluginFactory::getAllPluginIdentifiers().

double mod ( double  x,
double  y 
)

Definition at line 290 of file System.cpp.

Referenced by princarg().

float modf ( float  x,
float  y 
)

Definition at line 291 of file System.cpp.

Referenced by princargf().

double princarg ( double  a  ) 

Definition at line 293 of file System.cpp.

References mod().

float princargf ( float  a  ) 

Definition at line 294 of file System.cpp.

References modf().

Referenced by FFTModel::estimateStableFrequency(), FFTModel::getPeakFrequencies(), FFTFileCache::getPhaseAt(), FFTFileCache::setColumnAt(), and FFTMemoryCache::setColumnAt().


Generated on Wed Feb 20 15:45:31 2008 for SonicVisualiser by  doxygen 1.5.1