Fixed 'unused variable' warninings when compiling without thread safety
This commit is contained in:
parent
e084bd9c8d
commit
6cddd8a87a
2 changed files with 12 additions and 5 deletions
|
|
@ -40,9 +40,14 @@ typedef boost::mutex mutex_t;
|
|||
typedef boost::mutex::scoped_lock ScopedLock;
|
||||
|
||||
#else
|
||||
|
||||
typedef int mutex_t;
|
||||
typedef int ScopedLock;
|
||||
|
||||
class ScopedLock {
|
||||
public:
|
||||
explicit ScopedLock(const int m) : m_(m) {}
|
||||
private:
|
||||
int m_;
|
||||
};
|
||||
|
||||
#endif // THREAD_SAFE_CANTERA
|
||||
|
||||
|
|
|
|||
|
|
@ -35,14 +35,12 @@ cthreadId_t getThisThreadId()
|
|||
return pthread_self();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//! Mutex for input directory access
|
||||
static mutex_t dir_mutex;
|
||||
|
||||
//! Mutex for access to string messages
|
||||
static mutex_t msg_mutex;
|
||||
|
||||
//! Mutex for creating singletons within the application object
|
||||
static mutex_t app_mutex;
|
||||
|
||||
|
|
@ -304,6 +302,10 @@ void Application::Messages::write_logfile(std::string file)
|
|||
#endif // WITH_HTML_LOGS
|
||||
|
||||
#ifdef THREAD_SAFE_CANTERA
|
||||
|
||||
//! Mutex for access to string messages
|
||||
static mutex_t msg_mutex;
|
||||
|
||||
Application::Messages* Application::ThreadMessages::operator ->()
|
||||
{
|
||||
ScopedLock msgLock(msg_mutex);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue