Revert thread_local stuff

Unfortunatly accessing thread local variable
is much slower than object data (see previous
patch log msg), so we have to revert to old code
to avoid speed regression.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-04-06 18:36:46 +01:00
parent b1f57e92ce
commit c2fc80e5d1
10 changed files with 42 additions and 40 deletions

View File

@@ -119,7 +119,7 @@ public:
bool use_sleeping_threads() const { return useSleepingThreads; }
int min_split_depth() const { return minimumSplitDepth; }
int size() const { return (int)threads.size(); }
Thread* main_thread() const { return threads[0]; }
Thread* main_thread() { return threads[0]; }
void wake_up() const;
void sleep() const;
@@ -146,6 +146,5 @@ private:
};
extern ThreadsManager Threads;
extern THREAD_LOCAL Thread* this_thread;
#endif // !defined(THREAD_H_INCLUDED)