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

Add no-op futex syscall implementation #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pk/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ int sys_times(long* loc)
kloc[0] = t / (CLOCK_FREQ / 1000000);

memcpy_to_user(loc, kloc, sizeof(kloc));

return 0;
}

Expand All @@ -531,7 +531,7 @@ int sys_gettimeofday(long* loc)
kloc[1] = (t % CLOCK_FREQ) / (CLOCK_FREQ / 1000000);

memcpy_to_user(loc, kloc, sizeof(kloc));

return 0;
}

Expand Down Expand Up @@ -770,6 +770,7 @@ long do_syscall(long a0, long a1, long a2, long a3, long a4, long a5, unsigned l
[SYS_readlinkat] = sys_readlinkat,
[SYS_readv] = sys_readv,
[SYS_riscv_hwprobe] = sys_riscv_hwprobe,
[SYS_futex] = sys_stub_success,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-using sys_stub_success instead of creating a new function.

};

const static void* old_syscall_table[] = {
Expand Down
1 change: 1 addition & 0 deletions pk/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#define SYS_statx 291
#define SYS_readv 65
#define SYS_riscv_hwprobe 258
#define SYS_futex 98

#define OLD_SYSCALL_THRESHOLD 1024
#define SYS_open 1024
Expand Down