mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
Kernel: Fix the return type for syscalls
The Process::Handler type has KResultOr<FlatPtr> as its return type. Using a different return type with an equally-sized template parameter sort of works but breaks once that condition is no longer true, e.g. for KResultOr<int> on x86_64. Ideally the syscall handlers would also take FlatPtrs as their args so we can get rid of the reinterpret_cast for the function pointer but I didn't quite feel like cleaning that up as well.
This commit is contained in:
parent
b6435372cc
commit
2a78bf8596
71 changed files with 313 additions and 301 deletions
|
@ -8,14 +8,14 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
KResultOr<int> Process::sys$yield()
|
||||
KResultOr<FlatPtr> Process::sys$yield()
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
Thread::current()->yield_without_holding_big_lock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
KResultOr<int> Process::sys$donate(pid_t tid)
|
||||
KResultOr<FlatPtr> Process::sys$donate(pid_t tid)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
if (tid < 0)
|
||||
|
@ -29,7 +29,7 @@ KResultOr<int> Process::sys$donate(pid_t tid)
|
|||
return 0;
|
||||
}
|
||||
|
||||
KResultOr<int> Process::sys$sched_setparam(int pid, Userspace<const struct sched_param*> user_param)
|
||||
KResultOr<FlatPtr> Process::sys$sched_setparam(int pid, Userspace<const struct sched_param*> user_param)
|
||||
{
|
||||
REQUIRE_PROMISE(proc);
|
||||
struct sched_param desired_param;
|
||||
|
@ -54,7 +54,7 @@ KResultOr<int> Process::sys$sched_setparam(int pid, Userspace<const struct sched
|
|||
return 0;
|
||||
}
|
||||
|
||||
KResultOr<int> Process::sys$sched_getparam(pid_t pid, Userspace<struct sched_param*> user_param)
|
||||
KResultOr<FlatPtr> Process::sys$sched_getparam(pid_t pid, Userspace<struct sched_param*> user_param)
|
||||
{
|
||||
REQUIRE_PROMISE(proc);
|
||||
int priority;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue