git: 023b97a69969 - stable/14 - msun/ld80/e_powl.c: make powl() thread-safe by making static variables thread-local
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Aug 2024 03:26:17 UTC
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=023b97a69969257cf3e8ea9f1a9cefce6218fa3a commit 023b97a69969257cf3e8ea9f1a9cefce6218fa3a Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-08-06 14:50:57 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-08-14 03:25:55 +0000 msun/ld80/e_powl.c: make powl() thread-safe by making static variables thread-local (cherry picked from commit 0c00dbfeb0c814c3a87a4d490db3692c1f9441e9) --- lib/msun/ld80/e_powl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msun/ld80/e_powl.c b/lib/msun/ld80/e_powl.c index 34978b964559..d04d77a5ee98 100644 --- a/lib/msun/ld80/e_powl.c +++ b/lib/msun/ld80/e_powl.c @@ -230,13 +230,13 @@ static const long double R[] = { static const long double MAXLOGL = 1.1356523406294143949492E4L; static const long double MINLOGL = -1.13994985314888605586758E4L; static const long double LOGE2L = 6.9314718055994530941723E-1L; -static volatile long double z; -static long double w, W, Wa, Wb, ya, yb, u; +static _Thread_local volatile long double z; +static _Thread_local long double w, W, Wa, Wb, ya, yb, u; static const long double huge = 0x1p10000L; #if 0 /* XXX Prevent gcc from erroneously constant folding this. */ static const long double twom10000 = 0x1p-10000L; #else -static volatile long double twom10000 = 0x1p-10000L; +static _Thread_local volatile long double twom10000 = 0x1p-10000L; #endif static long double reducl( long double );