diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index 1881e05df2..7ef7230bbd 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -496,8 +496,6 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3) return virt$kill(arg1, arg2); case SC_set_mmap_name: return virt$set_mmap_name(arg1); - case SC_set_process_icon: - return virt$set_process_icon(arg1); case SC_exit: virt$exit((int)arg1); return 0; @@ -744,11 +742,6 @@ int Emulator::virt$kill(pid_t pid, int signal) return syscall(SC_kill, pid, signal); } -int Emulator::virt$set_process_icon(int shbuf_id) -{ - return syscall(SC_set_process_icon, shbuf_id); -} - int Emulator::virt$gettimeofday(FlatPtr timeval) { struct timeval host_timeval; diff --git a/DevTools/UserspaceEmulator/Emulator.h b/DevTools/UserspaceEmulator/Emulator.h index 0eed7cc46a..94d6224e13 100644 --- a/DevTools/UserspaceEmulator/Emulator.h +++ b/DevTools/UserspaceEmulator/Emulator.h @@ -126,7 +126,6 @@ private: int virt$unlink(FlatPtr path, size_t path_length); int virt$get_process_name(FlatPtr buffer, int size); int virt$set_mmap_name(FlatPtr); - int virt$set_process_icon(int); int virt$gettimeofday(FlatPtr); int virt$clock_gettime(int, FlatPtr); int virt$clock_nanosleep(FlatPtr); diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index bf7de7da2c..2cc1b0ff33 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -157,7 +157,6 @@ namespace Kernel { S(dbgputstr) \ S(watch_file) \ S(shbuf_allow_all) \ - S(set_process_icon) \ S(mprotect) \ S(realpath) \ S(get_process_name) \ diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index a81cbf575d..5cd22d6de8 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -881,7 +881,6 @@ static OwnPtr procfs$all(InodeIdentifier) process_object.add("amount_shared", process.amount_shared()); process_object.add("amount_purgeable_volatile", process.amount_purgeable_volatile()); process_object.add("amount_purgeable_nonvolatile", process.amount_purgeable_nonvolatile()); - process_object.add("icon_id", process.icon_id()); process_object.add("dumpable", process.is_dumpable()); auto thread_array = process_object.add_array("threads"); process.for_each_thread([&](const Thread& thread) { diff --git a/Kernel/Process.h b/Kernel/Process.h index 879b8db96c..ab674857c2 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -340,7 +340,6 @@ public: int sys$shbuf_set_volatile(int shbuf_id, bool); int sys$halt(); int sys$reboot(); - int sys$set_process_icon(int icon_id); int sys$realpath(Userspace); ssize_t sys$getrandom(Userspace, size_t, unsigned int); int sys$setkeymap(Userspace); @@ -457,11 +456,6 @@ public: return m_big_lock; } - int icon_id() const - { - return m_icon_id; - } - u32 priority_boost() const { return m_priority_boost; @@ -630,8 +624,6 @@ private: RefPtr m_alarm_timer; - int m_icon_id { -1 }; - u32 m_priority_boost { 0 }; u32 m_promises { 0 }; diff --git a/Kernel/Syscalls/process.cpp b/Kernel/Syscalls/process.cpp index 2e166c1967..bc90a38d56 100644 --- a/Kernel/Syscalls/process.cpp +++ b/Kernel/Syscalls/process.cpp @@ -41,20 +41,6 @@ pid_t Process::sys$getppid() return m_ppid.value(); } -int Process::sys$set_process_icon(int icon_id) -{ - REQUIRE_PROMISE(shared_buffer); - LOCKER(shared_buffers().lock()); - auto it = shared_buffers().resource().find(icon_id); - if (it == shared_buffers().resource().end()) - return -EINVAL; - auto& shared_buffer = *(*it).value; - if (!shared_buffer.is_shared_with(m_pid)) - return -EPERM; - m_icon_id = icon_id; - return 0; -} - int Process::sys$get_process_name(Userspace buffer, size_t buffer_size) { REQUIRE_PROMISE(stdio); diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp index 65a74f54b5..f3595e8fc1 100644 --- a/Libraries/LibC/unistd.cpp +++ b/Libraries/LibC/unistd.cpp @@ -550,12 +550,6 @@ void sync() syscall(SC_sync); } -int set_process_icon(int icon_id) -{ - int rc = syscall(SC_set_process_icon, icon_id); - __RETURN_WITH_ERRNO(rc, rc, -1); -} - static String getlogin_buffer; char* getlogin() diff --git a/Libraries/LibC/unistd.h b/Libraries/LibC/unistd.h index 8d1e2bd6a0..483a690011 100644 --- a/Libraries/LibC/unistd.h +++ b/Libraries/LibC/unistd.h @@ -61,7 +61,6 @@ int fsync(int fd); void sysbeep(); int gettid(); int donate(int tid); -int set_process_icon(int icon_id); int getpagesize(); pid_t fork(); int execv(const char* path, char* const argv[]); diff --git a/Libraries/LibCore/ProcessStatisticsReader.cpp b/Libraries/LibCore/ProcessStatisticsReader.cpp index 948e25aa3c..a0143a9912 100644 --- a/Libraries/LibCore/ProcessStatisticsReader.cpp +++ b/Libraries/LibCore/ProcessStatisticsReader.cpp @@ -75,7 +75,6 @@ HashMap ProcessStatisticsReader::get_all() process.amount_clean_inode = process_object.get("amount_clean_inode").to_u32(); process.amount_purgeable_volatile = process_object.get("amount_purgeable_volatile").to_u32(); process.amount_purgeable_nonvolatile = process_object.get("amount_purgeable_nonvolatile").to_u32(); - process.icon_id = process_object.get("icon_id").to_int(); auto& thread_array = process_object.get_ptr("threads")->as_array(); process.threads.ensure_capacity(thread_array.size()); diff --git a/Libraries/LibCore/ProcessStatisticsReader.h b/Libraries/LibCore/ProcessStatisticsReader.h index 0e4765d906..96cc832ad9 100644 --- a/Libraries/LibCore/ProcessStatisticsReader.h +++ b/Libraries/LibCore/ProcessStatisticsReader.h @@ -77,7 +77,6 @@ struct ProcessStatistics { size_t amount_clean_inode; size_t amount_purgeable_volatile; size_t amount_purgeable_nonvolatile; - int icon_id; Vector threads; diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp index 450e0b4e82..59e26f2c3c 100644 --- a/Libraries/LibGUI/Window.cpp +++ b/Libraries/LibGUI/Window.cpp @@ -721,10 +721,6 @@ void Window::apply_icon() rc = shbuf_allow_all(m_icon->shbuf_id()); ASSERT(rc == 0); - static bool has_set_process_icon; - if (!has_set_process_icon) - set_process_icon(m_icon->shbuf_id()); - WindowServerConnection::the().send_sync(m_window_id, m_icon->to_shareable_bitmap(WindowServerConnection::the().server_pid())); } diff --git a/Userland/top.cpp b/Userland/top.cpp index 41dffcd449..fac4c3b2d6 100644 --- a/Userland/top.cpp +++ b/Userland/top.cpp @@ -58,7 +58,6 @@ struct ThreadData { unsigned inode_faults; unsigned zero_faults; unsigned cow_faults; - int icon_id; unsigned times_scheduled; unsigned times_scheduled_since_prev { 0 }; @@ -120,7 +119,6 @@ static Snapshot get_snapshot() thread_data.inode_faults = thread.inode_faults; thread_data.zero_faults = thread.zero_faults; thread_data.cow_faults = thread.cow_faults; - thread_data.icon_id = stats.icon_id; thread_data.times_scheduled = thread.times_scheduled; thread_data.priority = thread.priority; thread_data.state = thread.state;