summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/API/Syscall.h1
-rw-r--r--Kernel/Process.h1
-rw-r--r--Kernel/Syscalls/clock.cpp10
-rw-r--r--Userland/DevTools/UserspaceEmulator/Emulator.h1
-rw-r--r--Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp12
5 files changed, 0 insertions, 25 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index e62cba8aa8..4c1c7156c2 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -64,7 +64,6 @@ enum class NeedsBigProcessLock {
S(munmap, NeedsBigProcessLock::Yes) \
S(get_dir_entries, NeedsBigProcessLock::Yes) \
S(getcwd, NeedsBigProcessLock::Yes) \
- S(gettimeofday, NeedsBigProcessLock::No) \
S(gethostname, NeedsBigProcessLock::No) \
S(sethostname, NeedsBigProcessLock::No) \
S(chdir, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/Process.h b/Kernel/Process.h
index eef282b126..9ae0d27e0b 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -317,7 +317,6 @@ public:
KResultOr<FlatPtr> sys$chdir(Userspace<const char*>, size_t);
KResultOr<FlatPtr> sys$fchdir(int fd);
KResultOr<FlatPtr> sys$adjtime(Userspace<const timeval*>, Userspace<timeval*>);
- KResultOr<FlatPtr> sys$gettimeofday(Userspace<timeval*>);
KResultOr<FlatPtr> sys$clock_gettime(clockid_t, Userspace<timespec*>);
KResultOr<FlatPtr> sys$clock_settime(clockid_t, Userspace<const timespec*>);
KResultOr<FlatPtr> sys$clock_nanosleep(Userspace<const Syscall::SC_clock_nanosleep_params*>);
diff --git a/Kernel/Syscalls/clock.cpp b/Kernel/Syscalls/clock.cpp
index 19b0dbd855..d0511e656d 100644
--- a/Kernel/Syscalls/clock.cpp
+++ b/Kernel/Syscalls/clock.cpp
@@ -116,14 +116,4 @@ KResultOr<FlatPtr> Process::sys$adjtime(Userspace<const timeval*> user_delta, Us
return 0;
}
-KResultOr<FlatPtr> Process::sys$gettimeofday(Userspace<timeval*> user_tv)
-{
- VERIFY_NO_PROCESS_BIG_LOCK(this);
- REQUIRE_PROMISE(stdio);
- auto tv = kgettimeofday().to_timeval();
- if (!copy_to_user(user_tv, &tv))
- return EFAULT;
- return 0;
-}
-
}
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.h b/Userland/DevTools/UserspaceEmulator/Emulator.h
index c61f055899..c1d18ac525 100644
--- a/Userland/DevTools/UserspaceEmulator/Emulator.h
+++ b/Userland/DevTools/UserspaceEmulator/Emulator.h
@@ -170,7 +170,6 @@ private:
int virt$get_process_name(FlatPtr buffer, int size);
int virt$set_process_name(FlatPtr buffer, int size);
int virt$set_mmap_name(FlatPtr);
- int virt$gettimeofday(FlatPtr);
int virt$clock_gettime(int, FlatPtr);
int virt$clock_nanosleep(FlatPtr);
int virt$dbgputstr(FlatPtr characters, int length);
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
index 9ccc4b99ac..d60e30d8a7 100644
--- a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
+++ b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
@@ -203,8 +203,6 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
case SC_exit:
virt$exit((int)arg1);
return 0;
- case SC_gettimeofday:
- return virt$gettimeofday(arg1);
case SC_clock_gettime:
return virt$clock_gettime(arg1, arg2);
case SC_clock_settime:
@@ -507,16 +505,6 @@ int Emulator::virt$killpg(int pgrp, int sig)
return syscall(SC_killpg, pgrp, sig);
}
-int Emulator::virt$gettimeofday(FlatPtr timeval)
-{
- struct timeval host_timeval;
- int rc = syscall(SC_gettimeofday, &host_timeval);
- if (rc < 0)
- return rc;
- mmu().copy_to_vm(timeval, &host_timeval, sizeof(host_timeval));
- return rc;
-}
-
int Emulator::virt$clock_gettime(int clockid, FlatPtr timespec)
{
struct timespec host_timespec;