Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108619965
D28796.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D28796.diff
View Options
diff --git a/include/runetype.h b/include/runetype.h
--- a/include/runetype.h
+++ b/include/runetype.h
@@ -88,7 +88,7 @@
__BEGIN_DECLS
extern const _RuneLocale _DefaultRuneLocale;
extern const _RuneLocale *_CurrentRuneLocale;
-#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL)
+#ifdef __RUNETYPE_INTERNAL
extern const _RuneLocale *__getCurrentRuneLocale(void);
#else
extern _Thread_local const _RuneLocale *_ThreadRuneLocale;
@@ -99,7 +99,7 @@
return _ThreadRuneLocale;
return _CurrentRuneLocale;
}
-#endif /* __NO_TLS || __RUNETYPE_INTERNAL */
+#endif /*__RUNETYPE_INTERNAL */
#define _CurrentRuneLocale (__getCurrentRuneLocale())
__END_DECLS
diff --git a/lib/libc/gen/getutxent.c b/lib/libc/gen/getutxent.c
--- a/lib/libc/gen/getutxent.c
+++ b/lib/libc/gen/getutxent.c
@@ -40,13 +40,8 @@
#include "utxdb.h"
#include "un-namespace.h"
-#ifdef __NO_TLS
-static FILE *uf = NULL;
-static int udb;
-#else
static _Thread_local FILE *uf = NULL;
static _Thread_local int udb;
-#endif
int
setutxdb(int db, const char *file)
diff --git a/lib/libc/gen/utxdb.c b/lib/libc/gen/utxdb.c
--- a/lib/libc/gen/utxdb.c
+++ b/lib/libc/gen/utxdb.c
@@ -128,11 +128,7 @@
struct utmpx *
futx_to_utx(const struct futx *fu)
{
-#ifdef __NO_TLS
- static struct utmpx *ut;
-#else
static _Thread_local struct utmpx *ut;
-#endif
if (ut == NULL) {
ut = calloc(1, sizeof *ut);
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -56,12 +56,10 @@
#undef _CurrentRuneLocale
extern _RuneLocale const *_CurrentRuneLocale;
-#ifndef __NO_TLS
/*
* A cached version of the runes for this thread. Used by ctype.h
*/
_Thread_local const _RuneLocale *_ThreadRuneLocale;
-#endif
extern int __mb_sb_limit;
@@ -199,7 +197,6 @@
return (_LDP_LOADED);
}
-#ifndef __NO_TLS
void
__set_thread_rune_locale(locale_t loc)
{
@@ -212,7 +209,6 @@
_ThreadRuneLocale = XLOCALE_CTYPE(loc)->runes;
}
}
-#endif
void *
__ctype_load(const char *locale, locale_t unused __unused)
diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c
--- a/lib/libc/locale/xlocale.c
+++ b/lib/libc/locale/xlocale.c
@@ -55,12 +55,11 @@
extern struct xlocale_component __xlocale_C_collate;
extern struct xlocale_component __xlocale_C_ctype;
-#ifndef __NO_TLS
/*
* The locale for this thread.
*/
_Thread_local locale_t __thread_locale;
-#endif
+
/*
* Flag indicating that one or more per-thread locales exist.
*/
@@ -143,16 +142,6 @@
pthread_getspecific(locale_info_key));
}
-#ifdef __NO_TLS
-locale_t
-__get_locale(void)
-{
- locale_t l = get_thread_locale();
- return (l ? l : &__xlocale_global_locale);
-
-}
-#endif
-
static void
set_thread_locale(locale_t loc)
{
@@ -172,10 +161,8 @@
} else {
pthread_setspecific(locale_info_key, l);
}
-#ifndef __NO_TLS
__thread_locale = l;
__set_thread_rune_locale(loc);
-#endif
}
/**
diff --git a/lib/libc/locale/xlocale_private.h b/lib/libc/locale/xlocale_private.h
--- a/lib/libc/locale/xlocale_private.h
+++ b/lib/libc/locale/xlocale_private.h
@@ -185,7 +185,7 @@
* locale has ever been set, then we always use the global locale.
*/
extern int __has_thread_locale;
-#ifndef __NO_TLS
+
/**
* The per-thread locale. Avoids the need to use pthread lookup functions when
* getting the per-thread locale.
@@ -206,9 +206,6 @@
}
return (__thread_locale ? __thread_locale : &__xlocale_global_locale);
}
-#else
-locale_t __get_locale(void);
-#endif
/**
* Two magic values are allowed for locale_t objects. NULL and -1. This
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
--- a/lib/libc/string/strerror.c
+++ b/lib/libc/string/strerror.c
@@ -128,16 +128,11 @@
char *
strerror_l(int num, locale_t locale)
{
-#ifndef __NO_TLS
static _Thread_local char ebuf[NL_TEXTMAX];
if (strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0)
errno = EINVAL;
return (ebuf);
-#else
- errno = ENOTSUP;
- return (NULL);
-#endif
}
char *
diff --git a/lib/libgssapi/gss_display_status.c b/lib/libgssapi/gss_display_status.c
--- a/lib/libgssapi/gss_display_status.c
+++ b/lib/libgssapi/gss_display_status.c
@@ -174,16 +174,6 @@
return msgs[v];
}
-#if defined(__NO_TLS)
-
-/*
- * These platforms don't support TLS on FreeBSD - threads will just
- * have to step on each other's error values for now.
- */
-#define __thread
-
-#endif
-
struct mg_thread_ctx {
gss_OID mech;
OM_uint32 maj_stat;
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -768,10 +768,6 @@
#endif
#endif /* __STDC_WANT_LIB_EXT1__ */
-#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)
-#define __NO_TLS 1
-#endif
-
/*
* Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
* translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
diff --git a/tests/sys/opencrypto/cryptodevh.py b/tests/sys/opencrypto/cryptodevh.py
--- a/tests/sys/opencrypto/cryptodevh.py
+++ b/tests/sys/opencrypto/cryptodevh.py
@@ -133,7 +133,6 @@
__XSI_VISIBLE = 700
__BSD_VISIBLE = 1
__ISO_C_VISIBLE = 2011
-__NO_TLS = 1
CRYPTO_DRIVERS_INITIAL = 4
CRYPTO_SW_SESSIONS = 32
NULL_HASH_LEN = 16
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 10:40 PM (8 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16217564
Default Alt Text
D28796.diff (5 KB)
Attached To
Mode
D28796: Remove __NO_TLS.
Attached
Detach File
Event Timeline
Log In to Comment