|
svcore
1.9
|
#include "base/Debug.h"#include <sys/mman.h>#include <dlfcn.h>#include <stdio.h>#include <cmath>

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 | ISNAN std::isnan |
| #define | ISINF std::isinf |
| #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() |
| #define | MBARRIER() SystemMemoryBarrier() |
Enumerations | |
| enum | ProcessStatus { ProcessRunning, ProcessNotRunning, UnknownProcessStatus } |
Functions | |
| void | SystemMemoryBarrier () |
| 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 MLOCK | ( | a, | |
| b | |||
| ) | ::mlock((a),(b)) |
Definition at line 79 of file System.h.
Referenced by RingBuffer< T, N >::mlock().
| #define MUNLOCK | ( | a, | |
| b | |||
| ) | (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) |
Definition at line 80 of file System.h.
Referenced by FFTMemoryCache::initialise(), WaveFileModel::RangeCacheFillThread::run(), and RingBuffer< T, N >::~RingBuffer().
| #define MUNLOCK_SAMPLEBLOCK | ( | a | ) | do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0); |
Definition at line 81 of file System.h.
Referenced by CodedAudioFileReader::pushBufferNonResampling().
| #define DLOPEN | ( | a, | |
| b | |||
| ) | dlopen((a).toStdString().c_str(),(b)) |
| #define DLSYM | ( | a, | |
| b | |||
| ) | dlsym((a),(b)) |
Definition at line 87 of file System.h.
Referenced by DSSIPluginFactory::discoverPluginsFrom(), LADSPAPluginFactory::discoverPluginsFrom(), DSSIPluginFactory::getDSSIDescriptor(), LADSPAPluginFactory::getLADSPADescriptor(), FeatureExtractionPluginFactory::getPluginIdentifiers(), and FeatureExtractionPluginFactory::instantiatePlugin().
| #define DLCLOSE | ( | a | ) | dlclose((a)) |
Definition at line 88 of file System.h.
Referenced by DSSIPluginFactory::discoverPluginsFrom(), LADSPAPluginFactory::discoverPluginsFrom(), FeatureExtractionPluginFactory::getPluginIdentifiers(), FeatureExtractionPluginFactory::instantiatePlugin(), FeatureExtractionPluginFactory::pluginDeleted(), and LADSPAPluginFactory::unloadLibrary().
| #define DLERROR | ( | ) | dlerror() |
| #define ISNAN std::isnan |
Definition at line 92 of file System.h.
Referenced by SparseValueModel< RegionRec >::addPoint(), and EditableDenseThreeDimensionalModel::setColumn().
| #define ISINF std::isinf |
Definition at line 93 of file System.h.
Referenced by SparseValueModel< RegionRec >::addPoint(), and EditableDenseThreeDimensionalModel::setColumn().
| #define PLUGIN_GLOB "*.so" |
Definition at line 123 of file System.h.
Referenced by LADSPAPluginFactory::discoverPlugins(), FeatureExtractionPluginFactory::findPluginFile(), FeatureExtractionPluginFactory::getPluginIdentifiers(), and LADSPAPluginFactory::loadLibrary().
| #define PATH_SEPARATOR ':' |
Definition at line 124 of file System.h.
Referenced by DSSIPluginFactory::getPluginPath(), and LADSPAPluginFactory::getPluginPath().
| #define DEFAULT_LADSPA_PATH "$HOME/ladspa:$HOME/.ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa" |
Definition at line 126 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 127 of file System.h.
Referenced by DSSIPluginFactory::getPluginPath().
| #define MUNLOCKALL | ( | ) | ::munlockall() |
| #define MBARRIER | ( | ) | SystemMemoryBarrier() |
Definition at line 135 of file System.h.
Referenced by RingBuffer< T, N >::read(), RingBuffer< T, N >::readAdding(), RingBuffer< T, N >::readOne(), RingBuffer< T, N >::write(), and RingBuffer< T, N >::zero().
| enum ProcessStatus |
| void SystemMemoryBarrier | ( | ) |
Definition at line 291 of file System.cpp.
| ProcessStatus GetProcessStatus | ( | int | pid | ) |
Definition at line 84 of file System.cpp.
References ProcessNotRunning, ProcessRunning, and UnknownProcessStatus.
Referenced by TempDirectory::cleanupAbandonedDirectories().
| void GetRealMemoryMBAvailable | ( | int & | available, |
| int & | total | ||
| ) |
Definition at line 126 of file System.cpp.
Referenced by StorageAdviser::recommend().
| int GetDiscSpaceMBAvailable | ( | const char * | path | ) |
Definition at line 247 of file System.cpp.
Referenced by StorageAdviser::recommend().
| void StoreStartupLocale | ( | ) |
Definition at line 304 of file System.cpp.
| void RestoreStartupLocale | ( | ) |
Definition at line 313 of file System.cpp.
Referenced by RealTimePluginFactory::enumerateAllPlugins(), FeatureExtractionPluginFactory::getAllPluginIdentifiers(), and RealTimePluginFactory::getAllPluginIdentifiers().
| double mod | ( | double | x, |
| double | y | ||
| ) |
Definition at line 322 of file System.cpp.
Referenced by princarg().
| float modf | ( | float | x, |
| float | y | ||
| ) |
Definition at line 323 of file System.cpp.
Referenced by princargf().
| double princarg | ( | double | a | ) |
Definition at line 325 of file System.cpp.
References mod().
| float princargf | ( | float | a | ) |
Definition at line 326 of file System.cpp.
References modf().
Referenced by FFTModel::estimateStableFrequency(), and FFTModel::getPeakFrequencies().