Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should jl_get_ptls_states_wrapper be extern instead of static? #38924

Closed
fingolfin opened this issue Dec 17, 2020 · 0 comments · Fixed by #39066
Closed

Should jl_get_ptls_states_wrapper be extern instead of static? #38924

fingolfin opened this issue Dec 17, 2020 · 0 comments · Fixed by #39066

Comments

@fingolfin
Copy link
Member

Currently get this compiler warning when compiling the master branch:

.../julia/src/threading.c:187:32: warning: ‘jl_get_ptls_states_wrapper’ defined but not used [-Wunused-function]
  187 | static JL_CONST_FUNC jl_ptls_t jl_get_ptls_states_wrapper(void) JL_GLOBALLY_ROOTED JL_NOTSAFEPOINT
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~

There are no references to jl_get_ptls_states_wrapper anywhere I could find, and anyway, it is static. So it could be removed. Except that one comment suggests that it is meant to be accessible by code linking against libjulia. Except it isn't, as far as I can tell. An oversight?

Perhaps I am wrong and this is accessible, via some black magic. Then I still think there is an issue here: the code really should have a comment explaining this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant