deb2f52a35
Kernel: Add support for named pipes
...
These only copy inodes stat when created, if you fchmod/fchown a named
pipe, the change will not be visible on the filesystem
2026-05-19 00:15:25 +03:00
8224659c48
Kernel: Allow creating FIFOs in tmpfs
2026-05-19 00:05:22 +03:00
1922d78661
Kernel: Add support for mkfifo{,at} mkdir at
...
Opening FIFOs still dont work as expected but at least you can create
them now :D
2026-05-18 23:53:09 +03:00
6d1ecc2388
Kernel: Clean up file creation
2026-05-18 15:26:59 +03:00
5cf658c175
Kernel: Fix 2 memory pinning bugs
...
If pinning a region succeeded but pushing the region to a vector failed,
we would leak the pin preventing the process from cleaning up
2026-05-17 03:38:18 +03:00
ef2738bfb7
Kernel: Disable devfs device add/remove logging
2026-05-17 03:38:18 +03:00
d7865b2929
Kernel: Don't msync file backed pages that were never mapped writable
2026-05-17 03:21:08 +03:00
9c79971bdc
LibC/Kernel: Add support for detached pthreads
2026-05-17 00:40:56 +03:00
ff75c15ba3
LibC: Move pthread keys to TCB
...
This removes all TLS relocations from libc which may become handy ;)
2026-05-17 00:29:20 +03:00
9e6fa0a1ba
Kernel: Add fast path for invalid address during region pin
...
Before I was falling through to the write lock which does allocation,
but as the read loop already saw, specified address was not mapped.
2026-05-17 00:29:20 +03:00
6e95519acc
Kernel: Make TTY write lock a mutex instead of a spinlock
...
The mutex could not be locked while processing ANSI DGR in VTTY
2026-05-17 00:29:20 +03:00
d081655913
Kernel: Add API for mutex to check if it is locked by current thread
...
Also add assertion that you have interrupts enabled :^)
2026-05-17 00:29:20 +03:00
d528314ae3
Kernel: Make SYS_FUTEX restartable
2026-05-17 00:29:20 +03:00
4ef7b8e71c
Kernel: AFG reset return value
2026-05-15 21:38:23 +03:00
1fcd72e578
Kernel: replaced is_partition/storage with kind
2026-05-15 21:37:18 +03:00
5e1b5c329b
Kernel: Allow HDA stream reset to timeout
...
This was hanging on some version of qemu :^)
2026-05-15 21:30:41 +03:00
b2f795b1e1
Kernel: Pipe ignore tc attr ioctls
2026-05-15 21:23:19 +03:00
16967cd9c0
Kernel: Replace is_* with kind field
...
Replaced the is_* virtual functions with a kind field instead
2026-05-15 21:23:12 +03:00
647d6a273d
Kernel: Changed stat values from func to be field
...
- Removed virtual functions for all of the stat stuff.
This did however introduce some issues, mainly with /proc
becoming out of sync if you changed your ID. I propose we
do the linux thing and just have a stat update function
which is optional, but allows dynamic updates of stat fields
for cases such as those in uid/gid in /proc.
- Simplified the API, although still kind of annoying
it is a bit simpler.
- Moved some of the FS structure from having the FS inode inside
the in memory inode to a Serialise <-> Deserialise model where
Inodes are deserialised from disk into in memory ones and then
back into on disk ones when it comes time for syncing.
This makes it semantically better in my opinion, as it explicitly
separates disk and non-disk functionality.
2026-05-15 20:49:04 +03:00
05c9f0640c
Kernel/LibC: Replace terminal syscalls with ioctls
...
isatty, tc{get,set}attr, tc{get,set}pgrp are now implemented as ioctls
instead of separate syscalls
2026-05-15 17:03:33 +03:00
28b873b949
Kernel: Allow recursive rwlock write lock
2026-05-15 17:03:33 +03:00
c352fb600f
Kernel: Reduce ext2 locking
...
Replace the mutex with a rwlock and lock when its not necessary
2026-05-14 17:23:06 +03:00
dd8a9b1793
Kernel: clamp msync address range instead of calling contains
2026-05-13 20:03:37 +03:00
5f237abc3b
Kernel: Don't lock Ext2FS while reading and writing blocks
...
There is really no reason for this. The underlying block devices are
(should be) thread safe themselves
2026-05-09 23:28:00 +03:00
0bf7328e04
Kernel: Handle TIOC{G,S}WINSZ on pipes
...
GCC likes to do this a lot and debug logging is excessive
2026-05-09 23:28:00 +03:00
9f4271f6d8
Kernel: Remove the big inode lock
...
This moves locking to the inodes themselves which allows reducing lock
times significantly. Main inodes (ext2 and tmpfs) still do contain a
single big mutex that gets locked during operations but now we have the
architecture to optimize these.
2026-05-09 23:28:00 +03:00
a7356716ff
Kernel: Reduce locking FileBackedRegions
2026-05-09 15:08:26 +03:00
d2e21f9380
Kernel: Fix 64 bit page table range reservation from lower->higher half
2026-05-06 17:30:43 +03:00
443be800b7
Kernel: Fix remote TLB shootdown for <= 32 pages
...
I was modifying the `vaddr` argument while invalidating which lead to
the smp message containing wrong virtual address. This showed up in
really weird bugs from invalid TLB
2026-05-06 17:30:43 +03:00
3ac955714b
Kernel: Optimize FileBackedRegion CoW
...
Just copy data from the existing page instead of locking inode's shared
data, copying to temporary buffer and finally copying to destination
2026-05-06 17:30:43 +03:00
62f5292f38
Kernel: Send only one TLB invalidation when creating a ByteRingBuffer
2026-05-06 17:30:43 +03:00
7553ede3b4
Kernel: Send only one TLB invalidation when creating a VirtualRange
2026-05-06 00:27:26 +03:00
eba97c1fc7
Kernel: Avoid possible dead lock while sending smp messages
...
Process own events while waiting for space on another processor. This
fixes a dead lock when processors are sending messages to each other
2026-05-06 00:09:05 +03:00
efeaafaff6
Kernel: Cleanup E1000 link speed code
2026-05-04 21:23:04 +03:00
6966475dcf
Kernel: Make E1000 sending lockless and mostly non-blocking
...
Now we only block if all 256 tx descriptors are waiting to be sent. This
removes TCP acks from taking 30% of profiles while DOWNLOADING files
2026-05-04 21:15:15 +03:00
dfe24b69e0
Kernel: Don't keep devfs locked while performing disk sync
2026-05-04 20:26:02 +03:00
93e1091252
Kernel: Rewrite kmalloc
...
Kmalloc is now a bitmap allocator with dynamic resizing and we dont need
to allocate 64 MiB static block of memory reserved for kmalloc :^)
2026-05-04 20:26:02 +03:00
f293377e31
Kernel: Dynamically allocate PCI devices
...
There was no need to prealloce almost a 5 MiB buffer for PCI all
possible pci devies :D
2026-05-04 20:26:02 +03:00
f4e2e62d04
Kernel: Remove kmalloc API for identity mapped results
...
This is no longer used. This finally allows me to rewrite kmalloc :^)
2026-05-04 20:26:02 +03:00
d42b363fb1
Kernel: Remove kmalloc identity map requirement from USB keyboard
...
This is the last place requiring kmalloc identity mapping
2026-05-04 20:26:02 +03:00
8773e80917
Kernel: Remove kmalloc identity map requirement from XHCI device init
2026-05-04 20:26:02 +03:00
0c6d713c4a
Kernel: Rewrite 32 bit paging to not depend on kmalloc
...
There are a lot of 'unnecessary' fast page mappings but at least this
works.
2026-05-04 20:26:02 +03:00
8091127150
Kernel: Add page table api to map multiple fast pages
...
This is not currently used, but can be handy in the future
2026-05-04 20:26:02 +03:00
b8dc199738
Kernel: Fix ByteRingBuffer->back()
2026-05-04 20:26:02 +03:00
74127c0f45
Kernel: Cleanup inline assembly accessing cpu specific data
2026-05-04 20:26:02 +03:00
2f45349658
Kernel: Calculate internet checksum in host endian
...
No need to swap bytes of every 16 bit word in the packet, we can just do
one swap at the return
2026-05-04 20:26:02 +03:00
fde085e04b
Kernel: Pass current cpu index as a GDT limit
...
I had no idea LSL was an instruction. This cleans up code to get the
current cpu by a lot and does not require extra segment usage :D
2026-05-04 20:26:02 +03:00
3b83daef17
Kernel: Use empty string instead of nullptr for non existing proc name
2026-05-04 20:26:01 +03:00
f37d9dbdb1
Kernel: Remove kmalloc_vaddr_of
...
This is no longer needed. It was only used for x86_64 paging and AP
stack initialization
2026-05-04 20:26:01 +03:00
b7cedad891
Kernel: Wrap syscall macro value in paranthesis
2026-05-04 20:26:01 +03:00