switch everything to the now-standardized thread_local

We're only using compilers new enough to support it now, so just use it
without a compatibility layer in between.

Change-Id: I97a24ed344e3d4ccde0b04af9c44995cf417a635
diff --git a/aos/linux_code/ipc_lib/aos_sync.cc b/aos/linux_code/ipc_lib/aos_sync.cc
index 311d88d..1275bbf 100644
--- a/aos/linux_code/ipc_lib/aos_sync.cc
+++ b/aos/linux_code/ipc_lib/aos_sync.cc
@@ -21,7 +21,6 @@
 #include <algorithm>
 
 #include "aos/common/logging/logging.h"
-#include "aos/linux_code/thread_local.h"
 #include "aos/common/once.h"
 #include "aos/common/macros.h"
 
@@ -182,7 +181,7 @@
 
 // Starts off at 0 in each new thread (because that's what it gets initialized
 // to in most of them or it gets to reset to 0 after a fork by atfork_child()).
-AOS_THREAD_LOCAL pid_t my_tid = 0;
+thread_local pid_t my_tid = 0;
 
 // Gets called before the fork(2) wrapper function returns in the child.
 void atfork_child() {
diff --git a/aos/linux_code/logging/linux_interface.cc b/aos/linux_code/logging/linux_interface.cc
index 626b2ee..b0a5c1b 100644
--- a/aos/linux_code/logging/linux_interface.cc
+++ b/aos/linux_code/logging/linux_interface.cc
@@ -3,7 +3,6 @@
 #include <sys/prctl.h>
 
 #include "aos/linux_code/complex_thread_local.h"
-#include "aos/linux_code/thread_local.h"
 #include "aos/common/die.h"
 
 namespace aos {
@@ -47,7 +46,7 @@
 // reason for doing this instead of just deleting them is that tsan (at least)
 // doesn't like it when pthread_atfork handlers do complicated stuff and it's
 // not a great idea anyways.
-AOS_THREAD_LOCAL bool delete_current_context(false);
+thread_local bool delete_current_context(false);
 
 }  // namespace
 
diff --git a/aos/linux_code/thread_local.h b/aos/linux_code/thread_local.h
deleted file mode 100644
index 503e18c..0000000
--- a/aos/linux_code/thread_local.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef AOS_LINUX_CODE_THREAD_LOCAL_H_
-#define AOS_LINUX_CODE_THREAD_LOCAL_H_
-
-// The storage class to use when declaring thread-local variables. This provides
-// a single place to change it if/when we want to switch to something standard.
-//
-// Example: AOS_THREAD_LOCAL void *bla;  // at namespace (aka global) scope
-//
-// C++11 has thread_local, but it's not clear whether Clang supports that as of
-// 12/18/12.
-#define AOS_THREAD_LOCAL __thread
-
-#endif  // AOS_LINUX_CODE_THREAD_LOCAL_H_