Kernel: Remove "requested wakeups" feature.

I only needed this to support the WindowServer living inside the kernel.
Now that it's been migrated to userspace, this can go. :^)
This commit is contained in:
Andreas Kling 2019-03-05 13:33:50 +01:00
parent 91031346e5
commit 1cc32ebc7e
Notes: sideshowbarker 2024-07-19 15:32:57 +09:00
3 changed files with 3 additions and 16 deletions

View file

@ -1029,10 +1029,8 @@ void Process::create_signal_trampolines_if_needed()
*(dword*)code_ptr = Syscall::SC_restore_signal_mask;
code_ptr += sizeof(dword);
*code_ptr++ = 0xcd; // int 0x82
// NOTE: Stack alignment padding doesn't matter when returning to ring0.
// Nothing matters really, as we're returning by replacing the entire TSS.
*code_ptr++ = 0x82;
*code_ptr++ = 0xb8; // mov eax, <dword>
*(dword*)code_ptr = Syscall::SC_sigreturn;
@ -2151,14 +2149,13 @@ int Process::sys$select(const Syscall::SC_select_params* params)
return error;
#ifdef DEBUG_IO
dbgprintf("%s<%u> selecting on (read:%u, write:%u), wakeup_req:%u, timeout=%p\n", name().characters(), pid(), m_select_read_fds.size(), m_select_write_fds.size(), m_wakeup_requested, timeout);
dbgprintf("%s<%u> selecting on (read:%u, write:%u), timeout=%p\n", name().characters(), pid(), m_select_read_fds.size(), m_select_write_fds.size(), timeout);
#endif
if (!m_wakeup_requested && (!timeout || (timeout->tv_sec || timeout->tv_usec))) {
if (!timeout || (timeout->tv_sec || timeout->tv_usec)) {
block(BlockedSelect);
Scheduler::yield();
}
m_wakeup_requested = false;
int markedfds = 0;
@ -2209,11 +2206,10 @@ int Process::sys$poll(pollfd* fds, int nfds, int timeout)
m_select_write_fds.append(fds[i].fd);
}
if (!m_wakeup_requested && timeout < 0) {
if (timeout < 0) {
block(BlockedSelect);
Scheduler::yield();
}
m_wakeup_requested = false;
int fds_with_revents = 0;

View file

@ -295,9 +295,6 @@ public:
bool is_superuser() const { return m_euid == 0; }
bool wakeup_requested() { return m_wakeup_requested; }
void request_wakeup() { m_wakeup_requested = true; }
FPUState& fpu_state() { return m_fpu_state; }
bool has_used_fpu() const { return m_has_used_fpu; }
void set_has_used_fpu(bool b) { m_has_used_fpu = b; }
@ -406,7 +403,6 @@ private:
RetainPtr<Region> m_display_framebuffer_region;
dword m_wakeup_requested { false };
bool m_has_used_fpu { false };
};

View file

@ -99,11 +99,6 @@ bool Scheduler::pick_next()
}
if (process.state() == Process::BlockedSelect) {
if (process.wakeup_requested()) {
process.m_wakeup_requested = false;
process.unblock();
return true;
}
if (process.m_select_has_timeout) {
auto now_sec = RTC::now();
auto now_usec = PIT::ticks_since_boot() % 1000;