aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
11 dayskstd: ring_buffer: add missing test tagFelix Morgner1-1/+1
11 dayskstd: ring_buffer: add interface type testsFelix Morgner1-0/+82
11 dayskstd: ring_buffer: implement operator[]Felix Morgner2-5/+45
11 dayskstd: ring_buffer: simplify element_atFelix Morgner1-3/+3
11 dayskstd: ring_buffer: rename element_at_indexFelix Morgner1-4/+4
11 dayskstd: ring_buffer: implement n-values ctor.Felix Morgner2-1/+99
11 dayskstd: ring_buffer: add missing documentationFelix Morgner1-4/+13
11 dayskstd: ring_buffer: rename head and tailFelix Morgner1-9/+9
11 dayskstd: ring_buffer: implement at()Felix Morgner2-0/+84
11 dayskstd: ring_buffer: implement size()Felix Morgner2-0/+18
11 dayskstd: ring_buffer: implement empty()Felix Morgner2-0/+18
11 dayskstd: ring_buffer: add do sectionsFelix Morgner1-0/+5
11 dayskstd: ring_buffer: implement max_size()Felix Morgner2-0/+16
11 dayskstd: ring_buffer: implement capacity()Felix Morgner2-4/+16
11 dayskstd: add ring_buffer includeFelix Morgner2-0/+37
11 dayschore: clean up python scriptsFelix Morgner21-57/+113
11 dayschore: update python dependenciesFelix Morgner1-182/+182
11 dayside: fix poetry dependenciesFelix Morgner2-387/+24
11 daysMerge branch 'fmorgner/implement-interrupt-locking' into 'develop'Felix Morgner14-25/+602
kapi/interrupts: implement irq_lock See merge request teachos/kernel!61
12 daysx86_64: fix flag readingFelix Morgner4-6/+92
12 dayside: enable <...> include checksFelix Morgner1-0/+2
12 dayskapi/interrupts: add testsFelix Morgner2-0/+254
12 dayskapi/interrupts: admit irq_lock dtor may panicFelix Morgner1-1/+8
12 dayskapi/interrupts: improve irq_lock protectionsFelix Morgner1-5/+53
The previous implementation suffered from four problems: 1. try_lock in the basic irq_lock always succeeded. 2. lock in the basic irq_lock always succeeded. 3. try_lock in the wrapper irq_lock did not use the base try_lock. 4. a foreign CPU could wrongly unlock a remote irq_lock. These issues are mitigated in this patch.
12 dayskapi/interrupts: tests: fix state data raceFelix Morgner1-14/+3
12 dayskapi/interrupts: tests: make IRQ state thread specificFelix Morgner1-3/+12
12 dayskapi/interrupts: implement IRQ lockFelix Morgner2-0/+110
12 dayskstd/mutex: export lockable conceptsFelix Morgner1-0/+9
12 dayskstd/concepts: add lockable conceptFelix Morgner1-0/+15
12 dayskstd/concepts: document basic_lockableFelix Morgner1-0/+12
12 dayskapi/interrupt: rework enablement APIFelix Morgner5-25/+61
2026-09-17build/x86_64: add missing -ffreestanding flagFelix Morgner1-0/+1
Enable the '-ffreestanding' flag in the x86_64 toolchain file to inform the compiler about the fact that it cannot rely on the presence of a standard library implementation, thereby suppressing some optimizations designed for regular user applications. GCC supports a number of clever optimizations, some of which rely on the presence of a standard library. One of them is "-ftree-loop-distribute-patterns". This optimization performs detection of certain loop patterns, replacing them with library calls when applicable. This is problematic for cases in which we implement the standard library functionality. Consider, a schematic, `memset``: ```c++ void memset(void * d, int v, size_t n) { for(auto i = 0uz; i < n: ++i) { d[i] = static_cast<std::byte>(v); } } ``` GCC recognizes this loop, and similar versions of it, as an implementation of `memset`. In a hosted implementation, this is an important optimization, since a standard library may be able to provide a specifically optimized version of `memset``. So the compiler replaces this `memset` loop with a call to `memset`, since it is not aware of the fact we are currently implementing `memset`. Interestingly, tail recursion optimization eliminates the call, transforming it into a jump to the start of `memset`. This leads to execution getting stuck inside `memset` with no way of exiting and no stack usage increase, thus causing an infinite lockup. While we could suppress the specific optimization, it is more effective to tell the compiler "why" it can emit a call to memset in those cases.
2026-09-14ide: silence LTRANS job server warningFelix Morgner1-0/+1
2026-09-10kstd: fix doc commentFelix Morgner1-1/+1
2026-09-10kapi/system: reduce panic buffer sizeFelix Morgner2-29/+163
Previously, we allocated a 512-byte buffer for every call of the formatted panic function. This was heavily increasing the stack size for a number of functions. We now don't print to a statically allocated buffer, but rather use the iterator-based formatting facility and a proxy iterator with a small, self-flushing buffer. This reduces that static overhead of the formatted panic function to by almost 500 bytes, while increasing possible message fidelity, since we are not longer arbitrarily limited by the buffer.
2026-09-10kernel: replace some more plain pointersFelix Morgner14-39/+45
2026-09-10kstd/memory: introduce observer_ptr castsFelix Morgner5-10/+58
2026-09-10docs: add size estimates to project ideasFelix Morgner1-1/+20
2026-09-10build: enable coverage in release test buildsFelix Morgner1-3/+3
2026-09-10kernel/vfs: reduce number registry pruningFelix Morgner2-8/+1
Previously, the number registry did a pruning pass whenever elements, either all or a filtered subset, were queried by a consumer. This meant, that every access to elements did an additional O(n) scan of the entire registry, to ensure no expired devices were still registered. This used to be necessary, when the ownership model for devices was still in flux. With the established device ownership model, this has become obsolete. Additionally, devices get numbered automatically when a device gains a facet the is observed by the device number registry. Since registering this type of facet is the responsibility of the device driver, since only a driver can know how to implement that facet for any given device, it also becomes the responsibility of the driver to revoke that facet if and when a device is detached from the system. Any device is always owned by the bus it is attached to. This means it is the bus' responsibility to inform drivers about devices disappearing. This closes the chain of responsibility cleanly, meaning the device number registry will never have to prune itself in any accessors. Instead, it will be informed by the facet registry that a facet for a device has been revoked, allowing it to un-number that device if applicable.
2026-09-10ci: enable release testsFelix Morgner1-5/+14
2026-09-10kstd/vector: fix UB in test suiteFelix Morgner2-11/+79
2026-09-10build: include dynamic stack size in warningsFelix Morgner2-3/+5
2026-09-10x86_64: remove unused includeFelix Morgner1-2/+0
2026-09-10x86_64: replace raw pointers with observer_ptrFelix Morgner24-73/+133
2026-09-09Merge branch 'fmorgner/x86-64-double-fault-handling' into 'develop'Felix Morgner52-197/+432
x86_64: handle double faults See merge request teachos/kernel!59
2026-09-09chore: replace some naked pointersFelix Morgner38-128/+153
The coding guidelines explicitly prohibit the use of "naked"/C-style pointers. However, there were some prominent examples in the kapi and the core kernel source. This changeset replaces them with the appropriate smart pointer types.
2026-09-09kstd/fmt: remove superfluous specifiers memberFelix Morgner1-2/+0
2026-09-09ide: clean up cmake status barFelix Morgner1-1/+27
2026-09-09ide: limit test executable search patternFelix Morgner1-0/+1