summaryrefslogtreecommitdiff
path: root/src/internal/locale_impl.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-12-09 16:58:32 -0500
committerRich Felker <dalias@aerifal.cx>2020-12-09 16:58:32 -0500
commit37fcc13c12ade19c37a1a8ac80be4a14e21cff1e (patch)
treebf9b3460c0ca84c4abdaab1f276e6f6e6d676c1c /src/internal/locale_impl.h
parentc53e9b239418eb3e0e8be256abd0f6ad7608bbcf (diff)
downloadmusl-37fcc13c12ade19c37a1a8ac80be4a14e21cff1e.tar.gz
lift locale lock out of internal __get_locale
this allows the lock to be shared with setlocale, eliminates repeated per-category lock/unlock in newlocale, and will allow the use of pthread_once in newlocale to be dropped (to be done separately).
Diffstat (limited to 'src/internal/locale_impl.h')
-rw-r--r--src/internal/locale_impl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/locale_impl.h b/src/internal/locale_impl.h
index 741a71c4..4431a92e 100644
--- a/src/internal/locale_impl.h
+++ b/src/internal/locale_impl.h
@@ -15,6 +15,8 @@ struct __locale_map {
const struct __locale_map *next;
};
+extern hidden volatile int __locale_lock[1];
+
extern hidden const struct __locale_map __c_dot_utf8;
extern hidden const struct __locale_struct __c_locale;
extern hidden const struct __locale_struct __c_dot_utf8_locale;