Commit Graph

5 Commits

Author SHA1 Message Date
Aleric Inglewood
484fff444f Compile fix for OSX 2012-08-31 05:23:20 +02:00
Aleric Inglewood
3469d65f95 Windows compile and linker fixes.
* Do not include aithreadid.h from debug.h, because the latter is
  included everywhere (from linden_common.h) and aithreadid.h is
  heavy (includes among others windows.h).
* On windows, thread local members cannot be exported.
2012-08-11 03:23:31 +02:00
Aleric Inglewood
91df8446b0 Oops bug fix for last commit. 2012-08-10 05:37:41 +02:00
Aleric Inglewood
ffb55f482a Compile fixes for windows. 2012-08-10 05:35:11 +02:00
Aleric Inglewood
37c8ea54eb Add AIThreadID - Cleanup of apr_os_thread* related code.
Apart from just really cleaning things up and moving
everything into one class regarding thread IDs (ie,
is_main_thread(), comparing ID's etc), this also
fixes an obscure bug where LL was casting thread ID's
to U32 and then compared those to find out if it
the same thread. It's theoretically possible that
such fails on a 64bit OS.

By generalizing the interface, I adopted the use
of a thread-local cache for the current thread ID
as used by LLMutex et al, so now all code benefits
from that. The idea was even extended to now also
be used for is_main_thread() tests and even resetting
a thread ID to the ID of the current thread.
2012-08-09 06:30:31 +02:00