Commit Graph

1659 Commits

Author SHA1 Message Date
4616997f5b
kernel: Store a thread's parent directly instead of its parent's PID 2023-05-04 22:58:04 +02:00
58eb2d7703
libc: Print failed assertions to stderr instead of stdout
All checks were successful
continuous-integration/drone/push Build is passing
This removes two FIXMEs from the time there was no stderr.
2023-05-04 16:37:13 +02:00
44e4ca804a
kernel: Make sure argument vectors passed to execve() are not too big 2023-05-04 16:36:24 +02:00
3eb78aa5f3
libos+init: Add a new Path class to handle both file descriptors and file paths
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 17:37:26 +02:00
abaf24d0da
kernel/CPU: Move some stuff to StringView 2023-05-03 17:35:46 +02:00
1215c38d75
libc: Add mkdtemp() and mkstemp()
All checks were successful
continuous-integration/drone/push Build is passing
No mktemp() though, as it has race conditions and was removed in POSIX.1-2008.
2023-05-03 16:43:30 +02:00
a0b45a51de
libc: Add rand() + srand()
All checks were successful
continuous-integration/drone/push Build is passing
Very basic random number generator, but that's what rand() is.
If you want secure numbers then use arc4random() or something idk
2023-05-02 21:20:24 +02:00
d9b7e8edc0
init: Read and launch service files in order using sort()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-02 20:56:28 +02:00
3628464284
libc: Fix some naming inconsistencies 2023-05-02 20:56:28 +02:00
d1801d484c
libc: Add qsort() 2023-05-02 20:56:27 +02:00
dcd93cce3a
libluna: Add a sort() function 2023-05-02 20:56:27 +02:00
6beea7f817
ls: Avoid printing an empty line when a directory is empty
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-02 11:00:28 +02:00
0fad179485
apps+libc+libos: Remove _LUNA_SYSTEM_ERROR_EXTENSIONS and reorder headers
All checks were successful
continuous-integration/drone/push Build is passing
libluna/libos headers can now go after errno.h, so there's no reason to keep them separate.
2023-05-02 10:51:53 +02:00
052ae4902e
libluna: Remove EFIXME and make others declare error_string() and error_name()
Closes #26.
2023-05-02 10:51:53 +02:00
7058ec945a
libluna: Use a String for name and handle prefix correctly in TarStream 2023-05-02 10:51:53 +02:00
6982a8c07e
libluna: Make String::from_string_view handle non-null-terminated strings properly 2023-05-02 10:51:52 +02:00
1444cbb3df
libluna: Allow constructing a StringView from a string that might not be null-terminated 2023-05-02 10:51:52 +02:00
1d6a39c924
libluna: Make String::split() inline
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 20:05:10 +02:00
376247ba8a
libluna: Add String::from_string_view()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 20:03:16 +02:00
53ec448e33
ls: Add the -l flag 2023-05-01 20:01:05 +02:00
2572d5b238
libc: Add wrapper for the fstatat() system call 2023-05-01 20:00:43 +02:00
458e0a87cc
libc: Fix S_IS* macros 2023-05-01 20:00:10 +02:00
48df90e636
libos+apps: Use os::*print* instead of (f)printf
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 19:32:00 +02:00
a2303665fc
libos: Add os:: print(), println(), eprint(), and eprintln() 2023-05-01 19:31:15 +02:00
df590f4e26
libluna: Add String::join() 2023-05-01 19:29:17 +02:00
7fbc644753
libc: Add clearenv
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 19:06:31 +02:00
967758d464
libc: Implement setenv() and unsetenv()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-30 14:46:34 +02:00
ac4bbd135b
libos: Add Directory::list()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 22:41:44 +02:00
6c5d6aaf00
libos: Make remove_tree_at use os::Directory
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 21:16:44 +02:00
3e277b5d6f
libos: Introduce os::Directory 2023-04-28 21:16:43 +02:00
8adfb6fdb9
libluna: Leave String in a valid state when moved 2023-04-28 21:16:43 +02:00
ae7c841fff
tests: Make building tests optional, although with no option to toggle them on for now
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 20:02:49 +02:00
b34f2149ee
tests: Test libluna's UTF-8 suite 2023-04-28 20:01:45 +02:00
c5a867d81c
libluna: Add wcscmp 2023-04-28 20:00:26 +02:00
15dcd6ad15
libluna: Check the whole string in Utf8StringDecoder::code_points() 2023-04-28 20:00:14 +02:00
b4a5aff071
libluna: Fix UTF-8 encoding 2023-04-28 19:59:40 +02:00
80914f0bb9
ArgumentParser: Add support for version information
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 16:33:05 +02:00
0c1d33f2ec
kernel: Move some files into subdirectories
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 15:55:06 +02:00
52ce4b28aa
Scheduler: Remove redundant check in for_each_child
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 15:22:16 +02:00
7b4cfd52cd
Scheduler: Don't search threads spawned before the current thread to find children
All checks were successful
continuous-integration/drone/push Build is passing
Children will always be spawned later (and thus have a higher PID) than their parent.
2023-04-28 15:19:01 +02:00
bcdec62f51
kernel: Allow returning early from Scheduler::for_each_child 2023-04-28 15:13:53 +02:00
f3ffdd32d4
libluna: Add support for range-based iteration to LinkedList 2023-04-28 15:12:21 +02:00
77dcfab5ef
kernel: Run the initialization process in a thread
All checks were successful
continuous-integration/drone/push Build is passing
This way we can give it more stack and also reclaim it later!
2023-04-28 13:23:07 +02:00
b1e400d795
libluna: Allow callers to optimize heap allocations by telling us they won't resize the returned memory
All checks were successful
continuous-integration/drone/push Build is passing
strdup() now does this. If someone resizes strdup()-ed memory, nothing bad will happen, they will just take a small performance hit the first time.

But I think realloc-ing strdup()-ed memory is rare, that's why I did this.
2023-04-27 17:36:25 +02:00
f0fc3ec7ca
Remove old note from README
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 22:49:43 +02:00
7c8f195088
base64: Rename --allow-garbage to --ignore-garbage
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 22:37:55 +02:00
e1ac9473a2
libluna: If allowing garbage chars while decoding Base64, skip them after the padding instead of erroring out 2023-04-26 22:32:24 +02:00
fb22e14524
tests: Add tests for Base64
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 21:17:09 +02:00
9d33e22ae0
apps: Add base64 2023-04-26 20:58:04 +02:00
b48d1024a8
libluna: Add Base64 encoding and decoding code 2023-04-26 20:57:48 +02:00