-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix macOS 10.12 build warning #422
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
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
Signed. |
|
CLAs look good, thanks! |
|
Just FYI, this is untested beyond confirming that it compiles without warnings under 10.12. I'd imagine it'll be fine elsewhere. I just haven't tested. If I'm wrong, I'm happy to mod the patch as needed. Thanks. |
9a0eb8c to
eeac956
Compare
|
ACK |
|
Update: I finally ran all the tests and Thanks. |
|
Isn't it necessary to replace this with something else that implements the same barrier? From the deprecation message, it seems |
|
@tmm1 - Fair point. I have noticed, going through the commit history, that a couple of similar warnings were fixed in a different manner that followed what the compiler prescribed. I'll look into a solution that maintains the barrier. Thanks. |
OSMemoryBarrier() has been deprecated as of macOS 10.12. Compile it only if on a version where it’s not deprecated.
|
Added atomic_thread_fence(), as suggested by the compiler. I chose sequentially-consistent ordering, as that seemed like the most logical choice. I'm happy to change this as the LevelDB team sees fit, though. Re-ran all the tests as mentioned above. Everything seemed fine. |
|
See #449, which is IMO the preferable fix. |
|
Fixed here. Closing this out. |
OSMemoryBarrier() has been deprecated as of macOS 10.12. Compile it only if on a version where it’s not deprecated.