Commit Graph

1131 Commits

Author SHA1 Message Date
5b72144fac
Add a handy consume() method to LinkedList
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 12:35:08 +01:00
92a7004c2f
Move the reaping logic to Scheduler 2022-12-19 12:24:15 +01:00
31ee901e01
TarStream: Add a variant of read_contents() returning an OwnedStringView 2022-12-19 12:21:17 +01:00
9eb829f3a2
CString: Add strcmp() 2022-12-19 12:20:56 +01:00
60520dff4c
Make MemoryManager's scope guards more robust
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 11:55:53 +01:00
0bdbffe0ca
Spinlock+LockedValue: Add try_lock() methods
All checks were successful
continuous-integration/drone/push Build is passing
For when you want to lock a resource if possible but not get blocked if it is locked by another thread.
2022-12-18 20:37:26 +01:00
283e641ece
Spinlock+LockedValue: Remove init() functions
Let's set the default (unlocked) value of Spinlock's underlying atomic to 0, so even if the constructor is not called it stays like that.
2022-12-18 20:36:15 +01:00
a63146a798
Show the date and time of build :)
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 18:51:25 +01:00
751377de0a
Scheduler: Make it possible for a thread to stop existing
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 18:43:34 +01:00
1b92fe36b4
Store the stack inside a thread 2022-12-18 18:43:17 +01:00
00cf267ac7
Lock EFIXME and error_string() behind a #define
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 18:14:48 +01:00
a08310ff5e
Add some more errno definitions
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 18:09:52 +01:00
cda0d49a4e
Add todo()
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 17:15:42 +01:00
4a7e48ed5d
Make sure wchar_t is wide enough to hold all Unicode code-points
All checks were successful
continuous-integration/drone/push Build is passing
Too bad if it isn't.
2022-12-18 17:14:12 +01:00
6c3b7672a0
Kernel: Demo the initrd using TarStream
All checks were successful
continuous-integration/drone/push Build is passing
Yes, we're using the physical address. Not optimal, this is only for demo purposes.
2022-12-18 16:39:35 +01:00
1d6092341a
Add a generic TarStream class
As long as it's in memory, we can use it :)
2022-12-18 16:38:47 +01:00
eadca3d25b
Add nullcpy()
Invented function to memcpy() with a specific size, but add a null terminator.
2022-12-18 16:31:02 +01:00
0d65f188f0
Alignment.h: Include the Types 2022-12-18 16:30:27 +01:00
730d0682ee
Result: Add try_set_value_with_specific_error() 2022-12-18 16:30:09 +01:00
b01878cd3c
Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 14:55:04 +01:00
ffd3385d0d
TextConsole: decoder -> utf8_decoder
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-18 14:42:53 +01:00
6389099808
UTF-8 part 2: Encoding wide-character strings into UTF-8
All checks were successful
continuous-integration/drone/push Build is passing
We now have Utf8StringEncoder and Utf8Encoder (no state this time)
2022-12-18 14:34:50 +01:00
9c1c6bb320
Add wcslen()
I think this can go in CString.h, no need to create a separate CWChar.h or something
2022-12-18 14:33:13 +01:00
36179155e1
Add UTF-8 support to TextConsole!!
All checks were successful
continuous-integration/drone/push Build is passing
Not much support, since the font only covers codepoints from U+0000 to U+00FF,
(Basic Latin & Latin Extended-A), but unprintable code-points are rendered as ONE box per code-point,
instead of multiple garbage characters.
So it's Unicode-aware, even if it can't print most characters.
2022-12-18 13:09:37 +01:00
75ba14a3ad
Add UTF-8 decoder support!! 2022-12-18 13:04:40 +01:00
23d405bbda
Add an unreachable() macro function that panics if reached 2022-12-18 12:40:28 +01:00
a89ae9bed7
Run include-what-you-use
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:51:19 +01:00
1b867151bd
MemoryManager: Run include-what-you-use
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:47:35 +01:00
95b0091622
Split off arch/x86_64/CPU.cpp into various files
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:45:06 +01:00
799a02c883
Remove unnecessary std:: prefix from inside std
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:33:47 +01:00
d5b9ff1569
Remove unused function definition
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:30:57 +01:00
e4b971f09c
Make LinkedList::prepend() also set the element as the last one if we have no elements
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:28:18 +01:00
f5de9c5589
LinkedList: Add a prepend() method
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:27:16 +01:00
c5220cbf64
LinkedList: Rename append_after to add_after 2022-12-17 15:27:00 +01:00
2bc6398d3e
TRY(): Call release_value() instead of expect_release_value()
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 15:15:27 +01:00
34c738116c
Result: Make some member functions const 2022-12-17 15:15:00 +01:00
90bd4a83c0
Result, Option: Move member initialization to constructors 2022-12-17 15:14:27 +01:00
ee6387e7b5
Refactor NumberParsing.cpp + a lot of comments 2022-12-17 15:00:19 +01:00
97cb57d521
Check for overflow/underflow in parse_signed_integer
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 14:42:56 +01:00
59c9d8f119
asm -> asm volatile
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 14:32:24 +01:00
acb0ab1cd7
Use TypeTraits in Alignment.h to make static assertions more readable
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 13:50:27 +01:00
ace674e518
LinkedList: Make sure the contained type inherits from DoublyLinkedListNode<T> 2022-12-17 13:49:47 +01:00
2cbc9fa385
Add some nice TypeTraits 2022-12-17 13:48:55 +01:00
f77126768f
Improve message 2022-12-17 13:48:22 +01:00
16954695dd
Tell the compiler that string_format is a printf-style function
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 12:45:26 +01:00
16e00bada0
Add comments to Format.h
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 12:43:29 +01:00
abbed13f27
Add a 'pure' variant of cstyle_format which is infallible
If we cannot fail to output, it doesn't make sense to propagate errors. So if you're SURE there are no errors, use pure_cstyle_format().
If, however, output can fail, use cstyle_format().

This has a drawback of adding quite a bit of code duplication to Format.cpp.
Some of it is dealt using templates, but some code still remains duplicate.
2022-12-17 12:38:22 +01:00
48fcb8734a
Give number parsing functions more meaningful names 2022-12-17 12:12:58 +01:00
cf3b2176f0
Implement OwnedStringView::from_string_literal
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 11:36:16 +01:00
df9a13cbfb
KernelVM: Make g_used_vm atomic and g_kernelvm_bitmap a LockedValue
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-17 10:56:24 +01:00