Go to file
Nat Goodspeed 55d7ac5e81 DRTVWR-494: Use std:🧵:id for LLThread::currentID().
LLThread::currentID() used to return a U32, a distinct unsigned value
incremented by explicitly constructing LLThread or by calling LLThread::
registerThreadID() early in a thread launched by other means. The latter
imposed an unobvious requirement on new code based on std::thread. Using
std:🧵:id instead delegates to the compiler/library the problem of
distinguishing threads launched by any means.

Change lots of explicit U32 declarations. Introduce LLThread::id_t typedef to
avoid having to run around fixing uses again if we later revisit this decision.

LLMutex, which stores an LLThread::id_t, wants a distinguished value meaning
NO_THREAD, and had an enum with that name. But as std:🧵:id promises
that the default-constructed value is distinct from every valid value,
NO_THREAD becomes unnecessary and goes away.

Because LLMutex now stores LLThread::id_t instead of U32, make llmutex.h
#include "llthread.h" instead of the other way around. This makes LLMutex an
incomplete type within llthread.h, so move LLThread::lockData() and
unlockData() to the .cpp file. Similarly, remove llrefcount.h's #include
"llmutex.h" to break circularity; instead forward-declare LLMutex.

It turns out that a number of source files assumed that #include "llthread.h"
would get the definition for LLMutex. Sprinkle #include "llmutex.h" as needed.

In the SAFE_SSL code in llcorehttp/httpcommon.cpp, there's an ssl_thread_id()
callback that returns an unsigned long to the SSL library. When LLThread::
currentID() was U32, we could simply return that. But std:🧵:id is very
deliberately opaque, and can't be reinterpret_cast to unsigned long.
Fortunately it can be hashed because std::hash is specialized with that type.
2019-12-06 16:31:49 -05:00
debian try to suppress some debian errors we don't care about 2015-11-10 09:55:05 -05:00
doc Merged in lindenlab/viewer-lynx 2019-06-22 03:17:43 +03:00
etc SL-694 - stub support for ObjectAnimation message type 2017-05-30 22:03:43 +01:00
indra DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2019-12-06 16:31:49 -05:00
scripts merge 2018-09-27 19:54:10 +01:00
.hgignore DRTVWR-418: Don't report anything in new build-vc120-{32,64}. 2016-11-23 12:06:31 -05:00
.hgtags Added tag 6.3.4-release for changeset 4033b3f57e76 2019-11-11 16:39:38 -05:00
BuildParams remove duplicated EDU definitions 2018-09-05 09:12:21 -04:00
README.md dummy checkin to build an upgrade target 2017-05-17 18:10:43 -07:00
autobuild.xml merge 6.3.2-release 2019-10-16 09:07:50 -04:00
build.sh SL-957: Convert absolute VIEWER_SYMBOL_FILE to native_path. 2018-08-31 16:59:59 -04:00

README.md

Second Life Viewer

This project manages the source code for the Second Life Viewer.

This source is available as open source; for details on licensing, see the licensing page on the Second Life wiki

For information on how to use and contribute to this, see the open source portal on the wiki.

To download the current default version, visit the download page. For even newer versions try the Alternate Viewers page