mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07: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:
parent
7ee10c6926
commit
79fa9765ca
262 changed files with 2415 additions and 2600 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$getsid(pid_t pid)
|
||||
ErrorOr<FlatPtr> Process::sys$getsid(pid_t pid)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(proc);
|
||||
|
@ -24,7 +24,7 @@ KResultOr<FlatPtr> Process::sys$getsid(pid_t pid)
|
|||
return process->sid().value();
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$setsid()
|
||||
ErrorOr<FlatPtr> Process::sys$setsid()
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(proc);
|
||||
|
@ -45,7 +45,7 @@ KResultOr<FlatPtr> Process::sys$setsid()
|
|||
return sid().value();
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$getpgid(pid_t pid)
|
||||
ErrorOr<FlatPtr> Process::sys$getpgid(pid_t pid)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(proc);
|
||||
|
@ -57,7 +57,7 @@ KResultOr<FlatPtr> Process::sys$getpgid(pid_t pid)
|
|||
return process->pgid().value();
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$getpgrp()
|
||||
ErrorOr<FlatPtr> Process::sys$getpgrp()
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(stdio);
|
||||
|
@ -77,7 +77,7 @@ SessionID Process::get_sid_from_pgid(ProcessGroupID pgid)
|
|||
return sid;
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$setpgid(pid_t specified_pid, pid_t specified_pgid)
|
||||
ErrorOr<FlatPtr> Process::sys$setpgid(pid_t specified_pid, pid_t specified_pgid)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(proc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue