-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Remove duplicate definition of jl_gc_safepoint #45120
Remove duplicate definition of jl_gc_safepoint #45120
Conversation
Which systems? Also, where is the other definition? |
On Yggdrasil on eg freebsd in julia_threads.h IIRC (there are only two word matches in all src/*.h for it). I kept that other one as it is properly protected against preprocessor substitution. |
This seems odd to me. I think it's properly in julia.h for external code. Internal code should be using the manually inlined define in julia-threads.h. they used to be named the same, but the define is now jl_gc_safepoint_. Perhaps julia-threads needs to have a define to tell users to use the underscore version instead. |
Note that julia_threads.h is unconditionally included from julia.h, so there is no way to avoid the duplicate definition for external code (hence this patch). (In general the Julia headers seem to be a bit of a mess :/) |
Ping? Maybe to drive home my point, this is in JL_DLLEXPORT void (jl_gc_safepoint)(void); So, the alternative to this patch would be remove the definition there and retain the one in |
@Keno which way should I resolve this? |
@Keno bump |
Remove the one in julia_threads.h and add a define in julia_internal.h that tells people not to use it in favor of the underscore version. In the future, we can clean up the headers further. |
1b08e35
to
3cf5e58
Compare
This prevents a compiler warning on some systems
3cf5e58
to
17dc921
Compare
I've changed it now to keep the one in Regarding adding a define to #define jl_gc_safepoint(x) "do not use jl_gc_safepoint" @#$% to raise a compiler error if something uses But that would cause some code in the kernel to not compile anymore, because it does use |
Yes, I think that should be safe everywhere. |
This prevents a compiler warning on some systems (cherry picked from commit 05eb153)
This prevents a compiler warning on some systems (cherry picked from commit 05eb153)
This prevents a compiler warning on some systems
This prevents a compiler warning on some systems
Please also backport to 1.8