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

Add a poisonable Barrier to picos_std.sync #351

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

polytypic
Copy link
Collaborator

@polytypic polytypic commented Feb 10, 2025

This PR adds a slim poisonable barrier to picos_std.sync — the barrier state and configuration is stored in a single int Awaitable.t. The state of the barrier is mostly updated using fetch_and_add, which should perform well.

In the future the bit manipulation logic could probably be tweaked or the OCaml compiler improved save a few instructions. The potential performance improvement from that is likely to be tiny, however.

@polytypic polytypic force-pushed the add-poisonable-barrier branch 9 times, most recently from 00b43aa to a33ada3 Compare February 13, 2025 08:58
@polytypic polytypic force-pushed the add-poisonable-barrier branch from a33ada3 to e7cd15d Compare February 13, 2025 09:22
@polytypic polytypic marked this pull request as ready for review February 13, 2025 09:25
@polytypic polytypic merged commit 65f36b1 into main Feb 13, 2025
5 of 6 checks passed
@polytypic polytypic deleted the add-poisonable-barrier branch February 13, 2025 09:39
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