ladybird/Libraries/LibCore
Andreas Kling 50677bf806 Kernel: Refactor scheduler to use dynamic thread priorities
Threads now have numeric priorities with a base priority in the 1-99
range.

Whenever a runnable thread is *not* scheduled, its effective priority
is incremented by 1. This is tracked in Thread::m_extra_priority.
The effective priority of a thread is m_priority + m_extra_priority.

When a runnable thread *is* scheduled, its m_extra_priority is reset to
zero and the effective priority returns to base.

This means that lower-priority threads will always eventually get
scheduled to run, once its effective priority becomes high enough to
exceed the base priority of threads "above" it.

The previous values for ThreadPriority (Low, Normal and High) are now
replaced as follows:

    Low -> 10
    Normal -> 30
    High -> 50

In other words, it will take 20 ticks for a "Low" priority thread to
get to "Normal" effective priority, and another 20 to reach "High".

This is not perfect, and I've used some quite naive data structures,
but I think the mechanism will allow us to build various new and
interesting optimizations, and we can figure out better data structures
later on. :^)
2019-12-30 18:46:17 +01:00
..
CArgsParser.cpp LibCore: Fix a crash in CArgsParser 2019-08-17 12:07:55 +02:00
CArgsParser.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
CConfigFile.cpp WindowServer+LibGUI: Implement basic color theming 2019-12-23 20:33:01 +01:00
CConfigFile.h WindowServer+LibGUI: Implement basic color theming 2019-12-23 20:33:01 +01:00
CDirIterator.cpp CDirIterator: Fix another instance of StringView::characters() misuse. 2019-07-08 14:03:19 +02:00
CDirIterator.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
CElapsedTimer.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CElapsedTimer.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CEvent.cpp LibCore+LibGUI: Allow inserting a CObject/GWidget before another 2019-11-05 20:41:27 +01:00
CEvent.h LibCore+LibGUI: Allow inserting a CObject/GWidget before another 2019-11-05 20:41:27 +01:00
CEventLoop.cpp LibCore+LibGUI: Don't fire timers in non-visible windows by default 2019-12-29 16:03:36 +01:00
CEventLoop.h LibCore+LibGUI: Don't fire timers in non-visible windows by default 2019-12-29 16:03:36 +01:00
CFile.cpp LibCore: Make CFile::open() truncate when opening something "WriteOnly" 2019-11-26 14:32:59 +01:00
CFile.h LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
CGzip.cpp LibCore: compile puff.c as a separate object 2019-12-25 10:11:09 +01:00
CGzip.h LibCore: Rename class Gzip -> CGZip 2019-11-10 12:52:23 +01:00
CHttpJob.cpp LibCore: Silence some aggressive CSocket and CHttpJob debug spam 2019-12-14 11:30:18 +01:00
CHttpJob.h LibCore: Make CHttpJob::response() return a CHttpResponse* 2019-12-10 20:46:33 +01:00
CHttpRequest.cpp LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CHttpRequest.h LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CHttpResponse.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CHttpResponse.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
CIODevice.cpp ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
CIODevice.h LibCore: Fix errors when compiling LibCore using clang instead of gcc 2019-12-27 02:19:55 +01:00
CIODeviceStreamReader.h LibCore: Rename CFileStreamReader => CIODeviceStreamReader. 2019-07-30 15:16:39 +02:00
CLocalServer.cpp LibCore: Allow LibCore to be compiled on macOS host 2019-12-27 02:19:55 +01:00
CLocalServer.h SystemServer+LibCore: Implement socket takeover 2019-11-26 19:58:25 +01:00
CLocalSocket.cpp LibCore: Allow LibCore to be compiled on macOS host 2019-12-27 02:19:55 +01:00
CLocalSocket.h LibCore: Convert CLocalSocket to ObjectPtr 2019-09-21 15:25:08 +02:00
CNetworkJob.cpp LibCore: Have CNetworkJob protect itself during the on_finish callback 2019-11-23 21:42:02 +01:00
CNetworkJob.h LibCore: Make it possible to cancel pending CNetworkJobs 2019-09-21 17:32:26 +02:00
CNetworkResponse.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CNetworkResponse.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CNotifier.cpp LibCore: Make CSocket's notifiers into children of the CSocket 2019-08-18 11:54:39 +02:00
CNotifier.h LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CObject.cpp LibCore+LibGUI: Don't fire timers in non-visible windows by default 2019-12-29 16:03:36 +01:00
CObject.h LibCore+LibGUI: Don't fire timers in non-visible windows by default 2019-12-29 16:03:36 +01:00
CProcessStatisticsReader.cpp Kernel: Refactor scheduler to use dynamic thread priorities 2019-12-30 18:46:17 +01:00
CProcessStatisticsReader.h Kernel: Refactor scheduler to use dynamic thread priorities 2019-12-30 18:46:17 +01:00
CSocket.cpp LibCore: Silence some aggressive CSocket and CHttpJob debug spam 2019-12-14 11:30:18 +01:00
CSocket.h CSocket: Don't create the read notifier until after we've connected 2019-09-22 21:46:46 +02:00
CSocketAddress.h LibCore: Initialise m_port as zero in CSocketAddress 2019-08-06 15:06:20 +02:00
CSyscallUtils.h LibCore: Improve logging of errors in safe_syscall() somewhat 2019-12-01 16:47:28 +01:00
CTCPServer.cpp LibCore: Make CTCPServer's local address/port getters return Optionals 2019-11-04 13:07:41 +01:00
CTCPServer.h LibCore: Make CTCPServer's local address/port getters return Optionals 2019-11-04 13:07:41 +01:00
CTCPSocket.cpp CSocket: Don't create the read notifier until after we've connected 2019-09-22 21:46:46 +02:00
CTCPSocket.h LibCore: Convert CTCPSocket to ObjectPtr, add construct() helper 2019-09-21 15:25:08 +02:00
CTimer.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CTimer.h LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CUserInfo.cpp LibCore: Make get_current_user_home_path() return String & close passwd 2019-08-03 08:32:07 +02:00
CUserInfo.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
Makefile LibCore: compile puff.c as a separate object 2019-12-25 10:11:09 +01:00
puff.c LibCore: Move puff() from LibDraw to LibCore 2019-11-23 23:43:37 +01:00
puff.h LibCore: compile puff.c as a separate object 2019-12-25 10:11:09 +01:00