Bananymous
0dd74e3c9d
Kernel: Implement syscalls for i686 and cleanup x86_64
...
This actually allows i686 to boot properly!
2024-04-03 02:23:23 +03:00
Bananymous
fe386fa819
Kernel: Implement thread start trampoline for userspace
...
This is needed on i686 to set segment registers.
2024-04-03 00:42:39 +03:00
Bananymous
2106a9e373
Kernel: Rework scheduler/processor stacks.
2024-04-02 12:34:42 +03:00
Bananymous
5050047cef
Kernel: Rewrite whole scheduler
...
Current context saving was very hacky and dependant on compiler
behaviour that was not consistent. Now we always use iret for
context saving. This makes everything more clean.
2024-03-29 18:02:12 +02:00
Bananymous
2dd0bfdece
Kernel: Make i386 thread tramplines crash
2024-03-26 00:10:42 +02:00
Bananymous
fe17958b9f
Kernel: Rename rsp->sp and rip->ip
...
This makes more sense if we support i386
2024-03-22 15:41:15 +02:00
Bananymous
896b919c9d
Kernel/LibC: pass environ pointer to process
2023-06-05 21:12:08 +03:00
Bananymous
e0a72defa2
Kernel: Add argc and argv to process entry
2023-05-16 00:27:49 +03:00
Bananymous
ec316391c5
Kernel: argc is passed as zero to userspace
2023-05-11 18:28:32 +03:00
Bananymous
8ee63f8264
Kernel: We can create basic userspace processes
...
These are still allocated on the kernel memory
2023-04-12 17:52:36 +03:00
Bananymous
f924ac9265
Kernel: Threads can now be terminated mid execution
2023-04-10 21:07:25 +03:00
Bananymous
3f01f936a1
Kernel: Fix framepointers on started threads
2023-04-10 21:07:25 +03:00
Bananymous
af854ec9e1
Kernel: Thread creation now takes void(*)() as entry and void* as data
...
This simplifies threading for the future and gets rid of (undefined?)
cast of member function pointer to address
2023-03-09 15:33:42 +02:00
Bananymous
1dd61e93b6
Kernel: Threads cannot take arguments anymore
2023-03-02 01:56:09 +02:00
Bananymous
1bd8b0fe5c
Kernel: Sleep now actually sleeps and allows idling
2023-02-19 18:52:25 +02:00
Bananymous
6fab26692b
Kernel: remove unnecessary function from x86_64 Thread.S
2023-02-02 23:48:18 +02:00
Bananymous
5b5e620d8a
Kernel: Improve multithreading support
...
We can now use arbitary BAN::function<void(...)> as the Thread.
I also implemented multithreading for i386 since it was not done
on the initial multithreading commit.
2023-02-02 23:24:12 +02:00