phoenix-firestorm/indra/llplugin
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
..
slplugin remove only-partially-successful attempt to put teamcity blocks around targets 2018-09-07 09:13:57 -04:00
CMakeLists.txt remove only-partially-successful attempt to put teamcity blocks around targets 2018-09-07 09:13:57 -04:00
llpluginclassmedia.cpp Brought back the changes from @andreyk for improved mouse scroll wheel performance (previously 8e228364f324) 2019-10-16 01:37:15 +03:00
llpluginclassmedia.h Brought back the changes from @andreyk for improved mouse scroll wheel performance (previously 8e228364f324) 2019-10-16 01:37:15 +03:00
llpluginclassmediaowner.h Fixes for 'MAINT-8196 Remove LLPluginCookieStore from the viewer' and 'MAINT-8194 Remove per-frame calls to updateJavascriptObject()' 2018-01-17 16:13:19 -08:00
llplugininstance.cpp remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
llplugininstance.h remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
llpluginmessage.cpp remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
llpluginmessage.h remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
llpluginmessageclasses.h remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
llpluginmessagepipe.cpp SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
llpluginmessagepipe.h DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
llpluginprocesschild.cpp SL-3704 Plugin exit issues 2019-07-01 17:28:58 +03:00
llpluginprocesschild.h merge changes for 4.0.1-release 2016-01-15 16:55:04 -05:00
llpluginprocessparent.cpp SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
llpluginprocessparent.h merge changes for 4.0.1-release 2016-01-15 16:55:04 -05:00
llpluginsharedmemory.cpp remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
llpluginsharedmemory.h remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00