From 37fcc13c12ade19c37a1a8ac80be4a14e21cff1e Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Wed, 9 Dec 2020 16:58:32 -0500
Subject: 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).
---
 src/internal/locale_impl.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/internal')

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;
-- 
cgit v1.2.3-70-g09d2