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/common/libc/aos_strerror.cc b/aos/common/libc/aos_strerror.cc
index 4bca500..2c9735d 100644
--- a/aos/common/libc/aos_strerror.cc
+++ b/aos/common/libc/aos_strerror.cc
@@ -5,8 +5,6 @@
#include <string.h>
#include <stdio.h>
-#include "aos/linux_code/thread_local.h"
-
// This code uses an overloaded function to handle the result from either
// version of strerror_r correctly without needing a way to get the choice out
// of the compiler/glibc/whatever explicitly.
@@ -35,7 +33,7 @@
} // namespace
const char *aos_strerror(int error) {
- static AOS_THREAD_LOCAL char buffer[kBufferSize];
+ static thread_local char buffer[kBufferSize];
// Call the overload for whichever version we're using.
return aos_strerror_handle_result(
diff --git a/aos/common/libc/aos_strsignal.cc b/aos/common/libc/aos_strsignal.cc
index 5fae327..2321a07 100644
--- a/aos/common/libc/aos_strsignal.cc
+++ b/aos/common/libc/aos_strsignal.cc
@@ -2,11 +2,10 @@
#include <signal.h>
-#include "aos/linux_code/thread_local.h"
#include "aos/common/logging/logging.h"
const char *aos_strsignal(int signal) {
- static AOS_THREAD_LOCAL char buffer[512];
+ static thread_local char buffer[512];
if (signal >= SIGRTMIN && signal <= SIGRTMAX) {
CHECK(snprintf(buffer, sizeof(buffer), "Real-time signal %d",