-
Notifications
You must be signed in to change notification settings - Fork 90
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
futex system call #2
Milestone
Comments
You're on the right tack, @yashrajkakkad! BTW, when you port a new system call, I generally recommend to read its man page: https://man7.org/linux/man-pages/man2/futex.2.html |
16 tasks
nuta
added a commit
that referenced
this issue
Nov 4, 2021
It helps where an error is constructed: [ 0.585] [7:curl] syscall: close(ffffffffffffffff, 0, 0, 0, 0, 0) [ 0.585] WARN: close: error: EBADF: This error originates from: #1: ffff800000184219 kerla::printk::capture_backtrace()+0x79 #2: ffff8000001dbb13 kerla::result::Error::new()+0x23 #3: ffff8000001dc0e7 <kerla::result::Error as c...la::result::Errno>>::from()+0x17 #4: ffff800000211177 <T as core::convert::Into<U>>::into()+0x17 #5: ffff8000001fcb55 kerla::fs::opened_file::OpenedFileTable::close()+0xa5 #6: ffff80000010b124 kerla::syscalls::close::<i...yscallHandler>::sys_close()+0xa4 #7: ffff80000011bf62 kerla::syscalls::SyscallHandler::do_dispatch()+0x4e62 #8: ffff8000001168fc kerla::syscalls::SyscallHandler::dispatch()+0x1ac
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: