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

Implement waitable_atomic for FreeBSD #1607

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ronaldklop
Copy link

Based on the Apple implementation rewritten to use _umtx_op syscall.

Based on the Apple implementation rewritten to use _umtx_op syscall.
@kelly-cs
Copy link
Contributor

kelly-cs commented Jan 9, 2025

Thanks for making this pull request! We just need a couple of things from you to start our consideration of the PR. Can you please:

  1. Sign our Contributor's Agreement.

  2. Create a new SERVER ticket on JIRA.

@ronaldklop
Copy link
Author

Thanks for making this pull request! We just need a couple of things from you to start our consideration of the PR. Can you please:

1. Sign our [Contributor's Agreement](https://www.mongodb.com/legal/contributor-agreement).

2. Create a new SERVER ticket on [JIRA](https://jira.mongodb.org/).

Thanks for your quick response.
I signed the agreement and created a ticket: https://jira.mongodb.org/browse/SERVER-99225.

@RedBeard0531
Copy link
Member

Sorry for the delay in writing back. My team owns this code and we have been debating internally what to do with this PR. On the one hand, we appreciate the effort to upstream support for other platforms. But on the other, we are hesitant to accept maintenance of code that isn't executed in our CI system and that we have limited ability to test. Our preference would probably be for you to maintain this as an out of tree patch. How much of a hardship would that be for you?

As for the code, I wanted to provide some feedback to ensure that you have the best version, regardless of whether it gets merged or maintained out-of-tree. Based on my reading of https://man.freebsd.org/cgi/man.cgi?query=_umtx_op&sektion=2&n=1, I think it would be better to base this off of the linux version rather than the apple version of the code. It seems like _umtx supports both absolute deadlines rather than relative timeouts, and supports a both nanosecond resolution and (assuming time_t is 64 bits) a long range into the future. The apple version needs to jump through some hoops to handle their unfortunate choice of 32-bit microseconds of relative timeouts.

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.

3 participants