From 78094e8ec3ca4c3274593ebbf645dc9728481675 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 2 Jan 2021 01:59:39 +0100 Subject: [PATCH] Remove unused jl_get_ptls_states_wrapper, update comments Since jl_get_ptls_states_wrapper is static, it can't be called by outside code. --- src/threading.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/threading.c b/src/threading.c index 83227854d7558b..23bc27e2dd2dba 100644 --- a/src/threading.c +++ b/src/threading.c @@ -142,12 +142,10 @@ jl_get_ptls_states_func jl_get_ptls_states_getter(void) // We use the faster static version in the main executable to replace // the slower version in the shared object. The code in different libraries // or executables, however, have to agree on which version to use. -// The general solution is to add one more indirection in the C entry point -// (see `jl_get_ptls_states_wrapper`). +// The general solution is to add one more indirection in the C entry point. // // When `ifunc` is available, we can use it to trick the linker to use the // real address (`jl_get_ptls_states_static`) directly as the symbol address. -// (see `jl_get_ptls_states_resolve`). // // However, since the detection of the static version in `ifunc` // is not guaranteed to be reliable, we still need to fallback to the wrapper @@ -184,13 +182,6 @@ static jl_ptls_t jl_get_ptls_states_init(void) return cb(); } -static JL_CONST_FUNC jl_ptls_t jl_get_ptls_states_wrapper(void) JL_GLOBALLY_ROOTED JL_NOTSAFEPOINT -{ -#ifndef __clang_analyzer__ - return (*jl_tls_states_cb)(); -#endif -} - JL_DLLEXPORT void jl_set_ptls_states_getter(jl_get_ptls_states_func f) { if (f == jl_tls_states_cb || !f)