From ec202eae8e84a4c99f054f771cb832046cb8769f Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Sun, 15 Dec 2013 16:24:14 -0800 Subject: __thread --> thread_local for C11 compat Also make thread_local available w/o including . (as the latter hasn't been implemented, but this part is trivial) --- src/libsystemd-bus/sd-bus.c | 4 ++-- src/libsystemd-bus/sd-event.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsystemd-bus') diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c index 338ce0619d..9c564de764 100644 --- a/src/libsystemd-bus/sd-bus.c +++ b/src/libsystemd-bus/sd-bus.c @@ -2813,13 +2813,13 @@ static int bus_default(int (*bus_open)(sd_bus **), sd_bus **default_bus, sd_bus } _public_ int sd_bus_default_system(sd_bus **ret) { - static __thread sd_bus *default_system_bus = NULL; + static thread_local sd_bus *default_system_bus = NULL; return bus_default(sd_bus_open_system, &default_system_bus, ret); } _public_ int sd_bus_default_user(sd_bus **ret) { - static __thread sd_bus *default_user_bus = NULL; + static thread_local sd_bus *default_user_bus = NULL; return bus_default(sd_bus_open_user, &default_user_bus, ret); } diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c index 06c84d717a..727528bb3c 100644 --- a/src/libsystemd-bus/sd-event.c +++ b/src/libsystemd-bus/sd-event.c @@ -2116,7 +2116,7 @@ _public_ int sd_event_get_now_monotonic(sd_event *e, uint64_t *usec) { _public_ int sd_event_default(sd_event **ret) { - static __thread sd_event *default_event = NULL; + static thread_local sd_event *default_event = NULL; sd_event *e; int r; -- cgit v1.2.3-54-g00ecf