-
Notifications
You must be signed in to change notification settings - Fork 340
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
Draft: Create _umtx_op shim for FreeBSD #3649
Conversation
Just one quick nit because I saw the notification, the PR description and commit message could be a bit more descriptive. :) They should mention |
0449c8a
to
197c2e6
Compare
197c2e6
to
5daf9bb
Compare
similarly to Linux, the umtx_op_wait_uint_private, umtx_op_wake_private and umtx_op_nwake_private operations enable an optimization, preventing these from working across processes.
be0c929
to
c17e34b
Compare
I think all of these commits will be merged into one before pulling this in main. |
When you mark this as ready for review, CI must be green. We won't land code that has clippy warnings. For intermediate commits it doesn't matter. |
let umtx_op_wait = this.eval_libc_i32("UMTX_OP_WAIT"); | ||
|
||
//FUTEX private operations are not supported by miri | ||
match op & !umtx_op_wait_uint_private & !umtx_op_wake_private & !umtx_op_nwake_private { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm? UMTX_OP_WAIT_UINT_PRIVATE
etc are not bitflags: https://github.com/freebsd/freebsd-src/blob/d19851f002862a5510bf31fae4083fab979258be/sys/sys/umtx.h#L76-L105
|
||
//FUTEX private operations are not supported by miri | ||
match op & !umtx_op_wait_uint_private & !umtx_op_wake_private & !umtx_op_nwake_private { | ||
umtx_op_wait => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since umtx_op_wait
is not a constant, I think this is the same as
match foo {
bar => todo!(),
}
i.e. it matches anything.
@b-ncMN what is your plan for this? If this is unlikely to be ready for at least some early feedback within the next 2 weeks, I'd prefer to close the PR so that we can keep the PR list for things that are actively being worked on. If you can out of time, you can always reopen the PR later. :) |
I'll close the PR due to inactivity, feel free to pick it up again any time. :) |
This PR lays the basic works for the _umtx_op shim for freebsd
I have implemented this by taking inspiration from the linux futex shim, so it may not be perfect and I am looking forward to criticism.
I will continue that on later commits because the tests do not currently pass