|
50e7b6cca7
|
core: Check the stack is in user memory before changing it to kernel space
Otherwise, we're just adding the physical base to an address that's already in the higher half.
|
2025-02-21 18:47:24 +01:00 |
|
|
9acbc45a80
|
core: Make thread.enterTask() automatically set the thread state to Running
|
2025-02-21 18:40:29 +01:00 |
|
|
c722341d3f
|
core: Change naming for virtual memory structures to reflect x86_64 terms
|
2025-02-21 18:33:36 +01:00 |
|
|
2ecd24df82
|
core: Add some annotations to managed thread variables
Some thread variables don't need to be set manually,
since they are updated whenever needed by some functions.
Add comments to make that clear.
|
2025-02-20 17:59:27 +01:00 |
|
|
b14c473a29
|
core: Make some functions in thread.zig private
|
2025-02-18 20:10:14 +01:00 |
|
|
0ee587a142
|
core: Add sleep support to the scheduler
|
2025-02-18 20:06:40 +01:00 |
|
|
e27ef97682
|
core: Set new threads' priority to 127
This is halfway through the priority range, so user processes can either lower or raise their priority from the default.
|
2025-02-18 19:30:46 +01:00 |
|
|
c455e8ea0b
|
core: Fix a small error in thread.zig
|
2025-02-17 23:04:43 +01:00 |
|
|
f0d5b60b83
|
core: Add priority-based scheduling
|
2025-02-17 20:15:30 +01:00 |
|
|
0edcae7aae
|
core: Store the physical page directory alongside the virtual pointer to it
|
2025-02-16 13:20:02 +01:00 |
|
|
6a2323c16b
|
core: Add thread states
|
2025-02-16 11:57:04 +01:00 |
|
|
09fb2b6554
|
core: Fix a few bugs in threading code
g_threads is processor-specific now, so it's unused, and setPageDirectory() needs the physical address.
|
2025-02-15 22:58:34 +01:00 |
|
|
985d8fec0a
|
core: Add basic threading code
|
2025-02-15 22:45:32 +01:00 |
|