Commit graph

14 commits

Author SHA1 Message Date
Drew Galbraith
8adde27d9b [Zion] Add a thread sleep call.
For now this can only sleep in increments of the scheduler quantum
(currently 50ms). It also uses a somewhat ineffecient way of tracking
the sleeping threads - it will scale linearly with the number of
sleeping threads.
2023-12-07 00:20:03 -08:00
Drew Galbraith
2dd69f5844 [Zion] Map user stacks in as regular MemoryObjects.
This allows us to easily track the physical memory so it
can be freed when the thread exits. It also simplifies the page fault
handler as it just needs to check regular mappings to find a user stack.
2023-11-24 16:51:35 -08:00
Drew Galbraith
8fb5b7c03c [Zion] Move existing proc/thread cleanup calls to the cleanup thread. 2023-11-24 15:40:44 -08:00
Drew Galbraith
cb590c96b8 [Zion] Add a proc/thread cleanup thread for future use. 2023-11-24 15:04:03 -08:00
Drew Galbraith
84e1b4cdb4 [Zion] Plumb user stack to free function on thread exit. 2023-11-23 07:12:23 -08:00
Drew Galbraith
96063126cb [Zion] Add task switching for SSE registers and enable them in userspace. 2023-11-21 15:52:17 -08:00
Drew Galbraith
308dd6a203 [Zion] Add a framework for better process exit. 2023-11-16 23:03:27 -08:00
Drew Galbraith
1364fbed9f [zion] Move to default permissions being supplied by KernelObjects 2023-08-01 18:22:41 -07:00
Drew Galbraith
36d82370c1 [zion] Add a thread wait syscall 2023-06-22 02:17:50 -07:00
Drew Galbraith
a99096b0ff [zion] Move the scheduler to the IntrusiveList for runnable threads 2023-06-21 16:28:42 -07:00
Drew Galbraith
e1af79b975 [zion/glacier] Move RefPtr to glacier. 2023-06-21 15:07:40 -07:00
Drew Galbraith
d60b2bdc61 [zion] Move channel to use the message queue. 2023-06-20 15:36:17 -07:00
Drew Galbraith
a47bac9966 [zion] Dynamically check Capability type.
Instead of passing an enum with the capability when creating it, relying
on polymorphism and a template struct tag to determine the object type
at runtime.

This is cleaner and avoids errors where we pass the wrong capability
type with the cap and do a bad cast at runtime.
2023-06-16 14:53:57 -07:00
Drew Galbraith
b5ad454ad1 Move Process & Thread to the object folder. 2023-06-06 20:18:53 -07:00
Renamed from zion/scheduler/thread.h (Browse further)