Go to file
Nat Goodspeed 5e7df752a6 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.
2020-03-25 15:28:17 -04: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(). 2020-03-25 15:28:17 -04:00
scripts merge 2018-09-27 19:54:10 +01:00
.clang-format Convert ignore file to git, add a .clang-format rules file 2020-01-10 16:27:33 -07:00
.gitignore Convert ignore file to git, add a .clang-format rules file 2020-01-10 16:27:33 -07:00
.hgtags Added tag 6.3.5-release for changeset 27ca5834bfe9 2019-12-12 13:15:52 -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 DRTVWR-496 Changed canonical_repo to lindenlab/viewer 2020-01-28 18:28:07 +02:00
build.sh SL-12615: Support a branch-specific setting for viewer_channel in TeamCity builds 2020-01-28 18:50:37 +02: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