summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-04-30 22:52:40 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-04-30 22:52:40 -0600
commit1b827077717483d59d1d16ec4203ae9fb8199c8f (patch)
treeb35e86a9d75bdaf8daed22d0eb18a36682be7ae3 /indra/llcommon
parent0516ef218b4745ac3f109554b147a9802341237c (diff)
parent66a445298e2991cbfd29affa445c76b56b8631d5 (diff)
Automated merge with ssh://hg.lindenlab.com/q/viewer-trunk
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llerror.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index bd334a6654..41ff5849f4 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1225,17 +1225,32 @@ namespace LLError
char** LLCallStacks::sBuffer = NULL ;
S32 LLCallStacks::sIndex = 0 ;
+#define SINGLE_THREADED 1
+
class CallStacksLogLock
{
public:
CallStacksLogLock();
~CallStacksLogLock();
+
+#if SINGLE_THREADED
+ bool ok() const { return true; }
+#else
bool ok() const { return mOK; }
private:
bool mLocked;
bool mOK;
+#endif
};
+#if SINGLE_THREADED
+ CallStacksLogLock::CallStacksLogLock()
+ {
+ }
+ CallStacksLogLock::~CallStacksLogLock()
+ {
+ }
+#else
CallStacksLogLock::CallStacksLogLock()
: mLocked(false), mOK(false)
{
@@ -1271,6 +1286,7 @@ namespace LLError
apr_thread_mutex_unlock(gCallStacksLogMutexp);
}
}
+#endif
//static
void LLCallStacks::push(const char* function, const int line)