blob: 503e18c5b6acda770536594b82a4dc8609b88df7 [file] [log] [blame]
Brian Silverman14fd0fb2014-01-14 21:42:01 -08001#ifndef AOS_LINUX_CODE_THREAD_LOCAL_H_
2#define AOS_LINUX_CODE_THREAD_LOCAL_H_
Brian Silvermanf665d692013-02-17 22:11:39 -08003
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
Brian Silverman14fd0fb2014-01-14 21:42:01 -080013#endif // AOS_LINUX_CODE_THREAD_LOCAL_H_