Commit Graph

15 Commits

Author SHA1 Message Date
Bananymous 3ba15b41a3 Kernel/LibC: remove PATH resoltion from kernel
I have no idea why I had made PATH environment variable parsing
to be part of the kernel. Now the shell does the parsing and
environment syscall is no longer needed.
2023-09-23 03:08:14 +03:00
Bananymous 6bb2c80bdd Kernel/LibC: userspace malloc now uses mmap to get memory
We could remove syscalls to allocate more memory. This was not
something the kernel should have done.
2023-09-23 02:26:23 +03:00
Bananymous 921d95d18f All: Clear lines with only whitspace in them 2023-09-10 00:31:42 +03:00
Bananymous dfb18d38f7 LibC: Add rand() and srand() implementation
This code is from the wikipedia page for Permuted congruential generator
2023-09-04 13:52:13 +03:00
Bananymous 24993f6020 LibC: implement setenv, unsetenv, putenv 2023-06-05 22:51:02 +03:00
Bananymous a7dc7ecb90 LibC: abort now prints 'abort()' and exits
we used to call assert in abort which then recursively called
abort again.
2023-06-05 18:23:19 +03:00
Bananymous 88e92eec9e LibC: Add simple definition for realloc
The syscall just crashes the kernel currently. I will implement
this when needed
2023-06-02 17:56:13 +03:00
Bananymous 05046d6e93 BAN: Error uses 64 bit error codes 2023-05-07 02:09:52 +03:00
Bananymous 054c5450df LibC: syscall() now returns -1 on error and updates errno 2023-05-07 01:51:39 +03:00
Bananymous 12e42f40c5 Kernel/LibC: add free function for FixedWidthAllocator
I have to rework the syscall API and allocators in process. For
now this works well enough :)
2023-05-07 01:21:50 +03:00
Bananymous bcfd838131 Kernel: Add basic fixed width allocator for userspace
We have to move process stacks to the general heap and maybe map
kernel to higher half.
2023-05-06 19:58:08 +03:00
Bananymous cd74b2167d LibC: Write mostly functioning stdio 2023-04-23 14:32:37 +03:00
Bananymous d9b7747fc5 LibC: exit() calls _fini() 2023-04-19 00:42:00 +03:00
Bananymous 3f9d6f0311 LibC: add needed stubs to build executables with our compiler 2023-04-12 17:53:02 +03:00
Bananymous a5830c5424 LibC: add stubs for a lot of functions 2023-04-05 23:58:40 +03:00