blob: 9563a87f011fd9165b3c4a0dfe3e4c9957b53290 [file] [log] [blame]
Brian Silvermanf665d692013-02-17 22:11:39 -08001#ifndef AOS_ATOM_CODE_THREAD_LOCAL_H_
2#define AOS_ATOM_CODE_THREAD_LOCAL_H_
3
4// The storage class to use when declaring thread-local variables. This provides
5// a single place to change it if/when we want to switch to something standard.
6//
7// Example: AOS_THREAD_LOCAL void *bla; // at namespace (aka global) scope
8//
9// C++11 has thread_local, but it's not clear whether Clang supports that as of
10// 12/18/12.
11#define AOS_THREAD_LOCAL __thread
12
13#endif // AOS_ATOM_CODE_THREAD_LOCAL_H_