summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-26 17:34:39 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-26 17:34:39 -0800
commit5352954eb65076d877cc74d4328620e910b93d1c (patch)
treea8bf1c956c0de44a5ab7eb0a2a05d5e9ed29b751 /indra/llcommon
parent13d4257868451d1e3a5797bd02a0e6f749cc0836 (diff)
parentb1891e2982cc03ccd695eae82989d3e58695616c (diff)
automated merge
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llfasttimer_class.cpp6
-rw-r--r--indra/llcommon/lltimer.cpp6
-rw-r--r--indra/llcommon/lltimer.h1
-rw-r--r--indra/llcommon/lltreeiterators.h34
-rw-r--r--indra/llcommon/llworkerthread.cpp1
5 files changed, 30 insertions, 18 deletions
diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp
index fae0a66873..6d8d81e114 100644
--- a/indra/llcommon/llfasttimer_class.cpp
+++ b/indra/llcommon/llfasttimer_class.cpp
@@ -114,7 +114,11 @@ static timer_tree_dfs_iterator_t end_timer_tree()
class NamedTimerFactory : public LLSingleton<NamedTimerFactory>
{
public:
- NamedTimerFactory()
+ NamedTimerFactory()
+ : mActiveTimerRoot(NULL),
+ mTimerRoot(NULL),
+ mAppTimer(NULL),
+ mRootFrameState(NULL)
{}
/*virtual */ void initSingleton()
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index ef3e8dbc94..21e165ebc9 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -565,19 +565,23 @@ LLEventTimer::LLEventTimer(F32 period)
: mEventTimer()
{
mPeriod = period;
+ mBusy = false;
}
LLEventTimer::LLEventTimer(const LLDate& time)
: mEventTimer()
{
mPeriod = (F32)(time.secondsSinceEpoch() - LLDate::now().secondsSinceEpoch());
+ mBusy = false;
}
LLEventTimer::~LLEventTimer()
{
+ llassert(!mBusy); // this LLEventTimer was destroyed from within its own tick() function - bad. if you want tick() to cause destruction of its own timer, make it return true.
}
+//static
void LLEventTimer::updateClass()
{
std::list<LLEventTimer*> completed_timers;
@@ -587,10 +591,12 @@ void LLEventTimer::updateClass()
F32 et = timer.mEventTimer.getElapsedTimeF32();
if (timer.mEventTimer.getStarted() && et > timer.mPeriod) {
timer.mEventTimer.reset();
+ timer.mBusy = true;
if ( timer.tick() )
{
completed_timers.push_back( &timer );
}
+ timer.mBusy = false;
}
}
diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h
index d009c0f5f7..4d995d5bba 100644
--- a/indra/llcommon/lltimer.h
+++ b/indra/llcommon/lltimer.h
@@ -188,6 +188,7 @@ public:
protected:
LLTimer mEventTimer;
F32 mPeriod;
+ bool mBusy;
};
U64 LL_COMMON_API totalTime(); // Returns current system time in microseconds
diff --git a/indra/llcommon/lltreeiterators.h b/indra/llcommon/lltreeiterators.h
index c946566e84..cb1304c54e 100644
--- a/indra/llcommon/lltreeiterators.h
+++ b/indra/llcommon/lltreeiterators.h
@@ -343,20 +343,20 @@ public:
/// Instantiate an LLTreeDFSIter to start a depth-first walk. Pass
/// functors to extract the 'child begin' and 'child end' iterators from
/// each node.
- LLTreeDFSIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc):
- mBeginFunc(beginfunc),
- mEndFunc(endfunc),
- mSkipChildren(false)
+ LLTreeDFSIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc)
+ : mBeginFunc(beginfunc),
+ mEndFunc(endfunc),
+ mSkipChildren(false)
{
// Only push back this node if it's non-NULL!
if (node)
mPending.push_back(node);
}
/// Instantiate an LLTreeDFSIter to mark the end of the walk
- LLTreeDFSIter() {}
+ LLTreeDFSIter() : mSkipChildren(false) {}
- /// flags iterator logic to skip traversing children of current node on next increment
- void skipDescendants(bool skip = true) { mSkipChildren = skip; }
+ /// flags iterator logic to skip traversing children of current node on next increment
+ void skipDescendants(bool skip = true) { mSkipChildren = skip; }
private:
/// leverage boost::iterator_facade
@@ -405,8 +405,8 @@ private:
func_type mBeginFunc;
/// functor to extract end() child iterator
func_type mEndFunc;
- /// flag which controls traversal of children (skip children of current node if true)
- bool mSkipChildren;
+ /// flag which controls traversal of children (skip children of current node if true)
+ bool mSkipChildren;
};
/**
@@ -451,21 +451,21 @@ public:
/// Instantiate an LLTreeDFSPostIter to start a depth-first walk. Pass
/// functors to extract the 'child begin' and 'child end' iterators from
/// each node.
- LLTreeDFSPostIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc):
- mBeginFunc(beginfunc),
- mEndFunc(endfunc),
- mSkipAncestors(false)
- {
+ LLTreeDFSPostIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc)
+ : mBeginFunc(beginfunc),
+ mEndFunc(endfunc),
+ mSkipAncestors(false)
+ {
if (! node)
return;
mPending.push_back(typename list_type::value_type(node, false));
makeCurrent();
}
/// Instantiate an LLTreeDFSPostIter to mark the end of the walk
- LLTreeDFSPostIter() {}
+ LLTreeDFSPostIter() : mSkipAncestors(false) {}
- /// flags iterator logic to skip traversing ancestors of current node on next increment
- void skipAncestors(bool skip = true) { mSkipAncestors = skip; }
+ /// flags iterator logic to skip traversing ancestors of current node on next increment
+ void skipAncestors(bool skip = true) { mSkipAncestors = skip; }
private:
/// leverage boost::iterator_facade
diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp
index 82c736266d..1b0e03cb2a 100644
--- a/indra/llcommon/llworkerthread.cpp
+++ b/indra/llcommon/llworkerthread.cpp
@@ -188,6 +188,7 @@ LLWorkerClass::LLWorkerClass(LLWorkerThread* workerthread, const std::string& na
: mWorkerThread(workerthread),
mWorkerClassName(name),
mRequestHandle(LLWorkerThread::nullHandle()),
+ mRequestPriority(LLWorkerThread::PRIORITY_NORMAL),
mMutex(NULL),
mWorkFlags(0)
{