1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>

We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace!
This was a slightly tedious refactoring that took a long time, so it's
not unlikely that some bugs crept in.

Nevertheless, it does pass basic functionality testing, and it's just
real nice to finally see the same pattern in all contexts. :^)
This commit is contained in:
Andreas Kling 2021-11-08 00:51:39 +01:00
parent 7ee10c6926
commit 79fa9765ca
262 changed files with 2415 additions and 2600 deletions

View file

@ -16,7 +16,7 @@ bool g_profiling_all_threads;
PerformanceEventBuffer* g_global_perf_events;
u64 g_profiling_event_mask;
KResultOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, u64 event_mask)
ErrorOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, u64 event_mask)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
REQUIRE_NO_PROMISES;
@ -66,7 +66,7 @@ KResultOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, u64 event_mask)
return 0;
}
KResultOr<FlatPtr> Process::sys$profiling_disable(pid_t pid)
ErrorOr<FlatPtr> Process::sys$profiling_disable(pid_t pid)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
REQUIRE_NO_PROMISES;
@ -96,7 +96,7 @@ KResultOr<FlatPtr> Process::sys$profiling_disable(pid_t pid)
return 0;
}
KResultOr<FlatPtr> Process::sys$profiling_free_buffer(pid_t pid)
ErrorOr<FlatPtr> Process::sys$profiling_free_buffer(pid_t pid)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
REQUIRE_NO_PROMISES;