File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,10 @@ extern "C" {
68
68
#if !defined(GETPOT_DISABLE_MUTEX)
69
69
#include " libmesh/threads.h"
70
70
#define SCOPED_MUTEX libMesh::Threads::spin_mutex::scoped_lock lock (_getpot_mtx)
71
+ #define GETPOT_MUTEX_DECLARE mutable libMesh::Threads::spin_mutex _getpot_mtx
71
72
#else
72
73
#define SCOPED_MUTEX
74
+ #define GETPOT_MUTEX_DECLARE
73
75
#endif
74
76
75
77
#define getpot_cerr libMesh::err
@@ -80,7 +82,9 @@ extern "C" {
80
82
#else // USE_LIBMESH
81
83
82
84
// Currently threaded GetPot use is only supported via libMesh Threads
85
+ #define GETPOT_DISABLE_MUTEX
83
86
#define SCOPED_MUTEX
87
+ #define GETPOT_MUTEX_DECLARE
84
88
85
89
#define getpot_cerr std::cerr
86
90
#define getpot_error () throw std::runtime_error (std::string(" GetPot Error" ))
@@ -499,9 +503,7 @@ class GetPot
499
503
* multiple threads at once, so we'll wrap access to
500
504
* mutable objects in a mutex.
501
505
*/
502
- #if !defined(GETPOT_DISABLE_MUTEX)
503
- mutable libMesh::Threads::spin_mutex _getpot_mtx;
504
- #endif
506
+ GETPOT_MUTEX_DECLARE;
505
507
506
508
/* *
507
509
* some functions return a char pointer to a string created on the fly.
You can’t perform that action at this time.
0 commit comments