Bananymous
83e2ad40d6
LibC: Implement gai_strerror and add stubs for {get,free}addrinfo
2024-08-09 16:59:49 +03:00
Bananymous
7ebd0699e3
LibC: Add _PC* definitions to unistd.h
...
These are not used for anything yet
2024-08-09 16:58:58 +03:00
Bananymous
46b1d4d194
LibC: Remove cxx abi stuff from libc
...
These will cause multiple definitions when linking with libstdc++
2024-08-09 16:58:11 +03:00
Bananymous
f60e265397
LibC: Add ldexp to math.cpp
2024-08-09 16:57:16 +03:00
Bananymous
2e642327ea
LibC: Implement localeconv()
2024-08-09 16:56:48 +03:00
Bananymous
a87ce41030
LibC: rename fd_set internal variable
...
binutils seems to need access to the internal type and uses this name
for lookup.
2024-08-09 16:55:52 +03:00
Bananymous
0c8cae4cc3
LibC: Move ioctl to <sys/ioctl.h>
...
Some ports seem to be assuming that ioctl exists there and not in
stropts.h
2024-08-09 16:54:30 +03:00
Bananymous
ed325b4a45
Kernel: Fix typo in userspace address validation
2024-08-09 16:52:57 +03:00
Bananymous
1c67b5e812
Kernel: Fix wait syscall to report status of exited children
2024-08-09 16:52:35 +03:00
Bananymous
b6c964c444
Kernel: Rewrite pipes
...
Pipes have now a fixed size buffer and pipe clone and close is working
again.
2024-08-09 16:50:19 +03:00
Bananymous
6fedf06150
LibC: Implement {sig,_,}{longjmp,setjmp}
2024-08-09 15:58:56 +03:00
Bananymous
91d513a672
2000th COMMIT: userspace: Implement basic fetch program bananfetch
...
This patch adds a obligatory fetch program to banan-os!
This program (`bananfetch`) fetches some basic information about the
operating system and the hardware its running on!
2024-08-09 15:58:56 +03:00
Bananymous
44f0ec601f
Kernel: Expose /proc/meminfo and fix /proc/<pid>/meminfo
...
Thread was unconditionally calling <stack>->size() without validating
that the stack actually exists
2024-08-09 15:58:56 +03:00
Bananymous
2a659a9d03
BuildSystem: Fix enable sse definition
...
__enable_sse was never actually defined for any targets. This also adds
__arch definition for libc (so `utsname` works).
2024-08-09 15:52:42 +03:00
Bananymous
7e7c3a1bb3
Kernel: VirtualTTY now handles dark colors
...
I have seemingly forgot to add these before
2024-08-09 15:52:42 +03:00
Bananymous
3b23458ecc
LibC: Start work on locales
...
This patch adds 2 locales, POSIX locale and UTF8 locale.
functions `mbstowcs()` and `strcoll()` use locales to do convertions and
comparison respectively.
2024-08-09 15:52:42 +03:00
Bananymous
7afdfb150f
LibC: Rewrite sigprocmask in terms of pthread_sigmask
...
Also don't fail SYS_SIGPROCMASK if how is invalid and set is NULL.
2024-08-07 17:01:35 +03:00
Bananymous
2ca7886f88
Ports: remove architecture from .compile_hash files
...
This is was over complicating things and there can be only one banan-os
build at a given time.
2024-08-07 16:34:28 +03:00
Bananymous
5aca6c7c1f
Ports: Fix bugs in the port system
...
Fix some bugs and add pkg-config for the port system. Also ncurses is
now downloaded from the gnu mirror in the hope that it works better
2024-08-07 01:57:44 +03:00
Bananymous
fe94d6cf89
LibC: Implement dummy rename() so vim can save files
...
vim calls rename when saving a file. This patch adds dummy
implementation that only works for regular files and does a copy instead
of proper rename.
2024-08-05 20:16:05 +03:00
Bananymous
0a7c316ffb
Kernel: Fix race condition when blocking threads
...
If thread was blocked, but had not reached block queue, you might
already get an unblock request which would fail on an assertion.
If blocked thread was load balanced to another processor and unblocked
simultaneously, there was a race condition.
2024-08-05 20:14:13 +03:00
Bananymous
e72424e01a
Kernel: Implement ANSI CSI M and fix ANSI CSI L
...
There are not maybe not correct, but work much better than the old ones
2024-08-05 15:53:01 +03:00
Bananymous
dbba9128a4
Ports: Add ncurses and vim port!
...
vim is kind of buggy because my virtual tty {insert,delete} line ansi
codes don't really work.
2024-08-05 15:20:18 +03:00
Bananymous
352c1ddc16
BuildSystem: Rewrite port compilation system
...
Now ports define some environment variables, and call a unified bash
script that handles configuration, recompilation and installation.
If a port uses non-configure buildsystem, port script can also specify
custom build and install step.
2024-08-05 15:20:18 +03:00
Bananymous
4d96ae56ac
LibC: Add stubs for ungetc(), tcflush() and symlink()
2024-08-05 01:48:24 +03:00
Bananymous
adadb10b15
LibC: Fix strsignal() and implement psignal()
2024-08-05 00:59:03 +03:00
Bananymous
a749b9806e
LibC: Add definition for h_errno
...
Nothing uses this yet, but linking will succeed
2024-08-05 00:58:06 +03:00
Bananymous
615d9d4abe
LibC: Add INADDR_LOOPBACK
...
Some port was using this. Loopback addresses are not supported, but they
will be 127.0.0.1.
2024-08-05 00:56:42 +03:00
Bananymous
aa03274093
LibC: Remove O_DIRECTORY from opendir()
...
opendir() did not work on symlinks after with this flag...
2024-08-05 00:55:03 +03:00
Bananymous
e7a06979ec
LibC: Implement usleep()
...
This is not a POSIX function, but some ports seem to be using it either
way
2024-08-05 00:54:17 +03:00
Bananymous
3651306f57
LibC: Implement strto{u,i}max()
2024-08-05 00:53:27 +03:00
Bananymous
5dce4e6aea
LibC: Implement strftime()
...
I did not test this at all, this might very well be broken
2024-08-05 00:49:44 +03:00
Bananymous
1d9041f2aa
LibC: make opendir() fail if path is not a directory
2024-08-01 22:57:46 +03:00
Bananymous
a578527012
Kernel/LibC: Implement ioctl(TIOCGWINSZ)
...
This allows ncurses to get the window size!
2024-08-01 22:56:26 +03:00
Bananymous
af78a2d080
Kernel: Implement ANSI CSI L for TTY
...
vim seems to be using this, so I decided its needed
2024-08-01 22:08:46 +03:00
Bananymous
840000d02b
Kernel: Make sure null signal is not send with kill()
2024-08-01 21:41:54 +03:00
Bananymous
9ea4c777ad
Kernel: TTY now handles ESC key presses
...
This allows exiting vim :D
2024-08-01 21:41:11 +03:00
Bananymous
a33b63d066
Kernel/LibC: Implement alarm() and setitimer()
...
This makes vim able to start!
2024-08-01 21:09:56 +03:00
Bananymous
da3b30cd94
Kernel: Add macro to dump all syscalls and their return values
2024-08-01 18:21:49 +03:00
Bananymous
4599e1dec5
Kernel: Make schedler not crash when unblocking active thread
...
This was happening when sending signals to processes that were currently
running.
2024-08-01 18:21:49 +03:00
Bananymous
6de350ce9d
Kernel/LibC: Cleanup, fix and implement a lot of signal code
...
This patch implements sigsets and some of their usages
2024-08-01 17:01:18 +03:00
Bananymous
838d31fa41
Kernel: Implement more POSIX compliant open() and openat() syscalls
2024-08-01 15:35:02 +03:00
Bananymous
401b460d75
LibC: Implement setbuf() and setvbuf()
2024-08-01 01:30:00 +03:00
Bananymous
c440204fa5
LibC: Implement dummy strcoll()
2024-07-31 23:58:10 +03:00
Bananymous
adf50dffd8
LibC: Implement uname()
2024-07-31 23:54:26 +03:00
Bananymous
20d38ed28c
LibC/Shell: Implement gethostname() and shell uses it for hostname
2024-07-31 23:53:55 +03:00
Bananymous
edc30cd71d
LibC: Compile without exceptions
...
This allows libc to not require __gxx_personality_v0. I can maybe add
C++ back to libc... :D I don't know why I did not research earlier what
this symbols was used for
2024-07-31 23:33:41 +03:00
Bananymous
10ce03a1e7
LibC: Implement ctime() and asctime()
2024-07-31 23:26:10 +03:00
Bananymous
5fca5c774a
LibC: Implement umask()
2024-07-31 23:26:10 +03:00
Bananymous
fc6c39e670
LibC: Implement gettimeofday()
2024-07-31 23:26:06 +03:00