You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A key feature of Linux kernel - futex is not yet implemented.
For a start, two operations can be implemented:
FUTEX_WAIT - Test if the value at the futex contains the expected value. If so, sleep.
FUTEX_WAKE - Wake up a number of waiters waiting on the futex word.
A futex consists of a kernelspace wait queue that is attached to an atomic integer in userspace. I found something similar here which is used for implementing spinlock: wait_queue.rs
You're on the right tack, @yashrajkakkad! wait_queue.rs will be helpful to stop/resume threads on a futex. One thing I'd like you to keep in mind is I have never used directory or implemented futex(2). Please let me know if say something incorrect :)
A key feature of Linux kernel - futex is not yet implemented.
For a start, two operations can be implemented:
FUTEX_WAIT
- Test if the value at the futex contains the expected value. If so, sleep.FUTEX_WAKE
- Wake up a number of waiters waiting on the futex word.A futex consists of a kernelspace wait queue that is attached to an atomic integer in userspace. I found something similar here which is used for implementing spinlock: wait_queue.rs
References:
@nuta I hope I am going in the right direction. I seek your valuable inputs to get started with the implementation.
The text was updated successfully, but these errors were encountered: