summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-12-03 11:38:46 -0800
committerAndrew A. de Laix <alain@lindenlab.com>2010-12-03 11:38:46 -0800
commit0ea483ce60c96d7f17cd461c617449f70a21d7a4 (patch)
tree4c0f1cf5788511a6fb520dce49aad00d12461ff0 /indra/llcommon
parentc767276ce62f18a295d64054beda438250abd4ae (diff)
parent2491555272283340206f3532b9417ec07df40022 (diff)
merge
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llthread.cpp24
-rw-r--r--indra/llcommon/llversionviewer.h2
2 files changed, 19 insertions, 7 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 148aaf8aed..49d05ef411 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -63,9 +63,6 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
{
LLThread *threadp = (LLThread *)datap;
- // Set thread state to running
- threadp->mStatus = RUNNING;
-
// Run the user supplied function
threadp->run();
@@ -167,10 +164,25 @@ void LLThread::shutdown()
void LLThread::start()
{
- apr_thread_create(&mAPRThreadp, NULL, staticRun, (void *)this, mAPRPoolp);
+ llassert(isStopped());
+
+ // Set thread state to running
+ mStatus = RUNNING;
- // We won't bother joining
- apr_thread_detach(mAPRThreadp);
+ apr_status_t status =
+ apr_thread_create(&mAPRThreadp, NULL, staticRun, (void *)this, mAPRPoolp);
+
+ if(status == APR_SUCCESS)
+ {
+ // We won't bother joining
+ apr_thread_detach(mAPRThreadp);
+ }
+ else
+ {
+ mStatus = STOPPED;
+ llwarns << "failed to start thread " << mName << llendl;
+ ll_apr_warn_status(status);
+ }
}
//============================================================================
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index b209e4aa38..d6fa5b1997 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -28,7 +28,7 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 2;
-const S32 LL_VERSION_MINOR = 4;
+const S32 LL_VERSION_MINOR = 5;
const S32 LL_VERSION_PATCH = 0;
const S32 LL_VERSION_BUILD = 0;