Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hpnkv
Copy link

@hpnkv hpnkv commented Apr 27, 2025

Hi! Starting with version 14.4, macOS SDK exposes a header that allows to operate with futexes: https://developer.apple.com/documentation/os/os_sync_wait_on_address.

I made a quick change, and it seems to work in my application: with the content of this PR, by defining BOOST_FIBERS_SPINLOCK_TTAS_FUTEX and an appropriate CMAKE_OSX_DEPLOYMENT_TARGET, I am able to use futex-based synchronisation primitives.

On versions prior to 14.4, the code should in principle default to its usual behaviour (pure spinlocks), so this should be a pretty self-contained change. Tests run with b2 cflags=-mmacosx-version-min=14.4 cxxflags=-mmacosx-version-min=14.4 pass, however, I am willing to provide something else for due process, if you have something on your mind.

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 this pull request may close these issues.

1 participant