diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-09-06 12:08:38 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-09-06 12:08:38 -0400 |
commit | a601c559e87d4f2d8b7a2b419b7e7b22cff37121 (patch) | |
tree | ff2feb05b4128b0edbd63ba82b90a90419440ae7 /indra/llcommon/llcoros.h | |
parent | 976f4b6252f30f7e64cba83ec43d98eb260a5261 (diff) |
MAINT-5232: Ensure that llcoro::get_id() returns distinct values.
Until now, the "main coroutine" (the initial context) of each thread left
LLCoros::Current() NULL. The trouble with that is that llcoro::get_id()
returns that CoroData* as an opaque token, and we want distinct values for
every stack in the process. That would not be true if the "main coroutine" on
thread A returned the same value (NULL) as the "main coroutine" on thread B,
and so forth. Give each thread's "main coroutine" a dummy heap CoroData
instance of its own.
Diffstat (limited to 'indra/llcommon/llcoros.h')
-rw-r--r-- | indra/llcommon/llcoros.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 5b6c6e5198..0da7a3a6e4 100644 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -234,6 +234,7 @@ private: Current(); operator LLCoros::CoroData*() { return get(); } + LLCoros::CoroData* operator->() { return get(); } LLCoros::CoroData* get() { return mCurrent->get(); } void reset(LLCoros::CoroData* ptr) { mCurrent->reset(ptr); } |