Make LLFrameTimer thread-safe.

LLFrameTimer::sFrameTime is accessed by the texture
thread as well. Although the only consequences are
that it's possible for a timer in the texture thread
to time out too early (or to never time out when
it's started) when it reads this variable at the
same time as that it is updated, which is pretty
inlikely, it's just not-done to leave anything
thread-unsafe when it's known to be thread-unsafe.

This patch also adds a framework for AIFrameTimer, but
that isn't implemented yet.
This commit is contained in:
Aleric Inglewood
2011-08-08 19:21:27 +02:00
parent 5e69c9fa05
commit e95ee85804
6 changed files with 227 additions and 69 deletions

View File

@@ -560,6 +560,9 @@ bool LLAppViewer::init()
// we run the "program crashed last time" error handler below.
//
// We can call this early.
LLFrameTimer::global_initialization();
// Need to do this initialization before we do anything else, since anything
// that touches files should really go through the lldir API
gDirUtilp->initAppDirs("SecondLife");