-
Notifications
You must be signed in to change notification settings - Fork 135
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
Jitarm64: Implements spin-loop futex for JIT blocks #3356
Conversation
I feel like FutexSpinWait probably isn't the best name for this, I haven't see futex used to refer to anything but the Linux syscall, which this explicitly doesn't use |
Renamed to SpinWaitLock |
There's nothing appropriate in the stl? or provided by Linux? Why do we need to roll our own? |
Nothing in the STL, libc, or Linux similar to a spin-loop. |
85b3dd2
to
e75277b
Compare
This will only be used internally inside of FEXCore for efficient shared codecach backpatch spin-loops.
This will ensure that multiple concurrent SIGBUS handlers in the same code block doesn't modify the same code.
Need to have a source be +r so it doesn't get overwritten.
…d lock We had a chance of doing an additional bogus wfe if the expected value was hit in one iteration of a loop. Not the biggest problem on current hardware where WFE only ever sleeps for 1-4 system cycles, but on future hardware where WFE might actually sleep for longer then this could have been an issue.
e75277b
to
a6c57f7
Compare
Needs #3339 merged first.This will ensure that multiple concurrent SIGBUS handlers in the same
code block doesn't modify the same code.