mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
Kernel: Remove the per-process icon_id and sys$set_process_icon()
This was a goofy kernel API where you could assign an icon_id (int) to a process which referred to a global shbuf with a 16x16 icon bitmap inside it. Instead of this, programs that want to display a process icon now retrieve it from the process executable instead.
This commit is contained in:
parent
cb68b8ff8b
commit
0e2b7f9c9a
12 changed files with 0 additions and 47 deletions
|
@ -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) \
|
||||
|
|
|
@ -881,7 +881,6 @@ static OwnPtr<KBuffer> 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) {
|
||||
|
|
|
@ -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<const Syscall::SC_realpath_params*>);
|
||||
ssize_t sys$getrandom(Userspace<void*>, size_t, unsigned int);
|
||||
int sys$setkeymap(Userspace<const Syscall::SC_setkeymap_params*>);
|
||||
|
@ -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<Timer> m_alarm_timer;
|
||||
|
||||
int m_icon_id { -1 };
|
||||
|
||||
u32 m_priority_boost { 0 };
|
||||
|
||||
u32 m_promises { 0 };
|
||||
|
|
|
@ -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<char*> buffer, size_t buffer_size)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue