summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-05Kernel: Make all Spinlocks use u8 for storage, remove templateBrian Gianforcaro
The default template argument is only used in one place, and it looks like it was probably just an oversight. The rest of the Kernel code all uses u8 as the type. So lets make that the default and remove the unused template argument, as there doesn't seem to be a reason to allow the size to be customizable.
2021-09-05RequestServer: Exit early to avoid executing protocol destructorsBrian Gianforcaro
I broke this when I made the protocol objects be wrapped by smart pointers to appease static analysis. The Protocol base class currently VERIFY's that it's never called. So to have the best of both worlds until someone actually fixes the code to do proper de-registration, just call `exit(..)` so the smart pointers never go out of scope.
2021-09-05Documentation: Add Patterns.mdBrian Gianforcaro
The purpose of this document is to track and describe the various patterns used through the SerenityOS code base.
2021-09-05Userland: Switch static_assert of type sizes to AK::AssertSizeBrian Gianforcaro
2021-09-05Kernel: Switch static_asserts of a type size to AK::AssertSizeBrian Gianforcaro
This will provide better debug ability when the size comparison fails.
2021-09-05AK: Add AssertSize utility template to provide rich type size assertionsBrian Gianforcaro
This type is useful, as the sizes will be visible in the compiler error messages, as they will be part of the template parameters. This is not possible with a normal static_assert of the sizeof a type.
2021-09-05Kernel: Use TRY() in DevFSLinkInode::write_bytes()Andreas Kling
2021-09-05Kernel: Use TRY() in ProcFSAndreas Kling
2021-09-05Kernel: Make FileSystem::get_inode() return KResultOr<NRP<Inode>>Andreas Kling
This allows for natural error propagation in a bunch of new places.
2021-09-05Kernel: Use TRY() in sys$waitid()Andreas Kling
2021-09-05Kernel: Simplify sys$inode_watcher_remove_watch() a little bitAndreas Kling
2021-09-05Kernel: Use TRY() in sys$create_inode_watcher() and friendsAndreas Kling
2021-09-05Kernel: Make file description lookup return KResultOrAndreas Kling
Instead of checking it at every call site (to generate EBADF), we make file_description(fd) return a KResultOr<NonnullRefPtr<FileDescription>>. This allows us to wrap all the calls in TRY(). :^) The only place that got a little bit messier from this is sys$mount(), and there's a whole bunch of things there in need of cleanup.
2021-09-05Kernel: Use TRY() in sys$sethostname()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$mount()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$umount()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$set_process_name()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$set_coredump_metadata()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$create_thread()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$set_thread_name()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$write()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$perf_register_string()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$recvfd()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$pledge()Andreas Kling
2021-09-05Kernel: Use TRY() even more in sys$mmap() and friends :^)Andreas Kling
2021-09-05Kernel: Use TRY() in sys$dbgputstr()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$map_time_page()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$setkeymap()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$realpath()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$statvfs()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$stat()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$unlink()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$readlink()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$rmdir()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$rename()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$utime()Andreas Kling
2021-09-05Kernel: Use copy_typed_from_user<T> for fetching syscall parametersAndreas Kling
2021-09-05Kernel: Add copy_typed_from_userspace<T>(Userspace<T const*>)Andreas Kling
This allows easy retrieval of typed POD values from userspace with implicit error propagation.
2021-09-05Kernel: Make copy_{from,to}_user() return KResult and use TRY()Andreas Kling
This makes EFAULT propagation flow much more naturally. :^)
2021-09-05Kernel: Use TRY() in sys$read() and sys$readv()Andreas Kling
2021-09-05Kernel: Reorder sys$pipe() to fail more nicelyAndreas Kling
Try to do both FD allocations up front instead of interleaved between assigning them to the descriptor table. This prevents us from failing in the middle of setting up the pipes.
2021-09-05Kernel: Use TRY() in sys$open()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$mknod()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$mkdir()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$lseek()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$fork()Andreas Kling
There's a lot of work to do on improving error propagation in the fork system call. This just scratches the surface.
2021-09-05Kernel: Use is_error() in sys$fcntl()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$chown()Andreas Kling
2021-09-05Kernel: Use TRY() in sys$chmod()Andreas Kling
2021-09-05Kernel: Use TRY() in AnonymousVMObjectAndreas Kling