This is a pretty big commit, so let's run through it in parts:
- All of the userspace changes are to switch away from syscall_wait
Mostly, this is to waitpid; some things were tweaked to do things
"properly" instead of waiting for particular processes. Init has
been fixed to do a proper spin wait.
- syscall_wait is gone - as are its uses. newlib bindings have been
using just waitpid for a while now.
- waitpid now performs like a Unix waitpid
- process reaping is no longer a "do this on next change thing":
it happens when a process is waited on, like it should
(That means we can have real zombies: terminated processes that
have not yet been waited on)
- Reparenting of children to init has been implemented, so you
can fork-daemonize!
Overall, this is pretty big... So I hope it doesn't break everything.
- Tasklets are essentially kernel threads. Still working on passing
arguments to them, but they essentially just run functions and have
special names like [[kttydebug]]. Eventually, I want disk scheduling
and various (non-interrupt-driven) drivers running on these, but I'm
still not sure how stable they are.
- Fix the scheduler so it supports not having anything to run. This took
some tracking of what's running, and then inserting some liberal
sleeps. Doesn't appear to break anything. Makes the system work when
you try to sleep with only one process "running", so that's good.
- Start working on reimplementing the old kernel shell, but this time as
a tasklet running in the background over serial. Probably going to try
to add all the same features as before (tab completion, history, rich
editing), but it may take some time to get it all in there. This
console is mostly focused on helping with debugging EXT2 and other
future stuff.
Address for program loading, kernel heap, userspace SHM regions, and
stacks have been changed.
Delete:
toolchain/build
toolchain/local
.userspace_check
Run:
python userspace/build.py clean
make clean-disk
make clean
./build.sh
* fix some terminal bugs (some, not all)
* add a serial device to the VFS
* fix up serial so it works better
* add a serial-console application
* fix a bug in some other stuff relating to allocations
* change size of the terminal described by toaru.terminfo
* adds a new system call
- Can now register a userspace file descriptor as the output for kernel
print statements through kprintf()
- Can set logging levels for debug print messages, which are separate
from kernel log events and meant to be more readily visible. Log
events are recorded in a buffer to be viewed later, though nothing
actually using logging at the moment.
- Serial output is disabled by default now. You can enable it yourself
by appending the logtoserial argument to the kernel on boot.