Andreas Kling
97c799576a
Add close-on-exec flag for file descriptors.
...
I was surprised to find that dup()'ed fds don't share the close-on-exec flag.
That means it has to be stored separately from the FileDescriptor object.
2018-11-13 01:36:31 +01:00
Andreas Kling
f1404aa948
Add primitive FIFO and hook it up to sys$pipe().
...
It's now possible to do this in bash:
cat kernel.map | fgrep List
This is very cool! :^)
2018-11-12 01:28:46 +01:00
Andreas Kling
d5d45d1088
Rage hacking to get bash to run. It finally runs. So cool! :^)
2018-11-11 15:38:07 +01:00
Andreas Kling
e71cb1c56b
Fix some paging related bugs exposed by the spawn stress test.
...
- Process::exec() needs to restore the original paging scope when called
on a non-current process.
- Add missing InterruptDisabler guards around g_processes access.
- Only flush the TLB when modifying the active page tables.
2018-11-09 01:25:31 +01:00
Andreas Kling
e287f8ef3a
The colonel task already had a halt loop.
...
Also don't reap() current in the scheduler, just wait until it's not current.
2018-11-08 00:30:35 +01:00
Andreas Kling
ac1d12465f
Move timer tick handling into Scheduler.
2018-11-08 00:26:04 +01:00
Andreas Kling
1dbc340da8
Get rid of the undertaker and have waitpid() be the reaper.
...
For dead orphans, the scheduler calls reap().
2018-11-07 23:59:49 +01:00
Andreas Kling
f792349853
Unbreak sys$sigreturn() after colonel process changes.
2018-11-07 23:21:32 +01:00
Andreas Kling
43f40a3050
Finally unbreak the colonel process and make it the true idle process.
2018-11-07 23:14:56 +01:00
Andreas Kling
440029c9d1
Reduce number of passes in the scheduler by 2.
2018-11-07 22:24:20 +01:00
Andreas Kling
39d2fcbbee
Move the scheduler code to its own class.
...
This is very mechanical.
2018-11-07 22:15:02 +01:00