asteroids(1) now uses chvideomode(1) if no driver is active.
Made the asteroids game object oriented.
Added asteroids to ateroids(1).
uptime(2) in asteroids.
Note that there seems to be a deadlock if a process exits when there are
zombies around. Init also doesn't handle zombie children correctly as there
is sent no SIGCHLD signal yet.
This helps running cross compiled programs as well as compiling programs
under Sortix with gcc. There is also support for global constructors.
Currently, cross-compiled executables uses these startup files. The current
build system continues to use start.o, which does not offer global
constructors and other useful features.
Note that these using the crtX.o files requires the crtbegin.o and crtend.o
files that ship with the cross compiler, but that should be no problem.
There are still a few non-standard quirks and things that needs to be
properly implemented but that shouldn't be too hard and the most important
features are now implemented.
This is a rather stupid implementation as it does the search in linear
time. More importantly, it is correct and helps porting gcc. Besides, it
can easily be fixed in due time.
This violates POSIX but POSIX is stupid in this respect. Of course, this
will ever so subtly break some applications. Not sure how this stupid design
can be fixed without breaking backwards compatibility. Perhaps remove the
putenv(3) function and replace it with a better replacement? (Or perhaps you
should just use setenv(3) anyways..)
This helps gcc build since it assumes that string.h provides various
functions that POSIX mandates is in strings.h. This is OK with me since that
strings.h is a nasty hack anyways. Also, glibc does this.
This caused a corruption of the resulting file if the program fwrite some
data that is buffered, then fseeks, and then fflushes. The fwrite will then
happen at the wrong memory location. Flushing in fseeko(3) fixes the problem
but it may cause violate some standard or just be inefficient.
Previously fread and fwrite for file descriptors would return the number of
bytes read/written rather than the number of elements read/written. This
breaks the C standard and broke various third party programs such as
readelf from binutils.
Removed Maxsi::Process:: functions as they suck and are barely used. Gave
the functions standard names and put them in their own source files.
The declarations now have nice noreturn attributes attached.
It's a much better name if you think of it as task-fork or thread-fork in the
sense that it either modifies this task or creates a new one. This call will
be used to provide user-space threads as well as fork(2).
This code uses the cr0 task switched bit to disable the FPU upon task
switch, which allows the kernel to delay copying the registers until
another task starts using them. Or better yet, if no other thread actually
uses the registers, then it won't need to do any copying at all!
Note that the scheduler does not load/restore floating point numbers yet
upon task switching. This means only one task can use floating point numbers
at the same time without the risk of race conditions.
Note that this enables SSE in 32-bit x86 platforms - but not all models
have such support, which limits which computers Sortix works on. Ideally, we
should detect what features are available on the computer at runtime and
enable/disable the proper kernel support. This is not a problem on x86_64.