Skip to content

Commit

Permalink
Switch to USE_COMPILER_TLS on Cosmo
Browse files Browse the repository at this point in the history
Issue #666 (bdwgc).

In thread-local allocation implementation, use "__thread" keyword to
declare GC_thread_key and directly access the key instead of use of
pthread_set/getspecific.

* include/private/thread_local_alloc.h [!USE_PTHREAD_SPECIFIC
&& !USE_WIN32_SPECIFIC && !USE_WIN32_COMPILER_TLS && !USE_COMPILER_TLS
&& !USE_CUSTOM_SPECIFIC && !GC_WIN32_THREADS && !HOST_ANDROID
&& !(LINUX && GC_GNUC_PREREQ(3,3)) && COSMO && (GC_GNUC_PREREQ(4,4)
|| GC_CLANG_PREREQ(3,9))] (USE_COMPILER_TLS): Define.
  • Loading branch information
ivmai committed Oct 16, 2024
1 parent 0532d00 commit 6be081a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/private/thread_local_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ EXTERN_C_BEGIN
# define USE_COMPILER_TLS
# endif

# elif (defined(FREEBSD) \
# elif (defined(COSMO) || defined(FREEBSD) \
|| (defined(NETBSD) && __NetBSD_Version__ >= 600000000 /* 6.0 */)) \
&& (GC_GNUC_PREREQ(4, 4) || GC_CLANG_PREREQ(3, 9))
# define USE_COMPILER_TLS
Expand Down

0 comments on commit 6be081a

Please sign in to comment.