1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

Rework WindowServer to use select() in its main event loop.

The system can finally idle without burning CPU. :^)

There are some issues with scheduling making the mouse cursor sloppy
and unresponsive that need to be dealt with.
This commit is contained in:
Andreas Kling 2019-01-16 17:20:58 +01:00
parent f7ca6d254d
commit 4fef895eda
15 changed files with 121 additions and 33 deletions

View file

@ -236,7 +236,7 @@ public:
template<typename T> bool validate_read_typed(T* value, size_t count = 1) { return validate_read(value, sizeof(T) * count); }
template<typename T> bool validate_write_typed(T* value, size_t count = 1) { return validate_write(value, sizeof(T) * count); }
Inode* cwd_inode() { return m_cwd.ptr(); }
Inode* cwd_inode();
Inode* executable_inode() { return m_executable.ptr(); }
size_t number_of_open_file_descriptors() const;
@ -256,6 +256,9 @@ public:
Vector<GUI_Event>& gui_events() { return m_gui_events; }
SpinLock& gui_events_lock() { return m_gui_events_lock; }
bool wakeup_requested() { return m_wakeup_requested; }
void request_wakeup() { m_wakeup_requested = true; }
private:
friend class MemoryManager;
friend class Scheduler;
@ -357,6 +360,8 @@ private:
Vector<GUI_Event> m_gui_events;
SpinLock m_gui_events_lock;
int m_next_window_id { 1 };
dword m_wakeup_requested { false };
};
extern Process* current;