Kernel: Fix deadlock caused by multithreading

This allows multiple threads to concurrently call the most common
blocking syscalls:
- read
- write
- accept
- connect
- sendto
- recv
- pselect

This prevents a dead lock when for example process is waiting on a pipe,
but unable to write to it since process is locked.

This is the beginning of starting to remove processes own lock from
syscall and locking only necessary parts.
This commit is contained in:
2025-04-22 04:32:47 +03:00
parent c790bad667
commit f8e3ae0525
2 changed files with 166 additions and 84 deletions

View File

@@ -241,6 +241,7 @@ namespace Kernel
BAN::ErrorOr<void> validate_string_access(const char*);
BAN::ErrorOr<void> validate_pointer_access_check(const void*, size_t, bool needs_write);
BAN::ErrorOr<void> validate_pointer_access(const void*, size_t, bool needs_write);
BAN::ErrorOr<MemoryRegion*> validate_and_pin_pointer_access(const void*, size_t, bool needs_write);
uint64_t signal_pending_mask() const
{