mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 05:07:35 +00:00
Kernel+LibC: Pass 64-bit integers in syscalls by value
Now that support for 32-bit x86 has been removed, we don't have to worry about the top half of `off_t`/`u64` values being chopped off when we try to pass them in registers. Therefore, we no longer need the workaround of pointers to stack-allocated values to syscalls. Note that this changes the system call ABI, so statically linked programs will have to be re-linked.
This commit is contained in:
parent
87f4b0f1c2
commit
286984750e
Notes:
sideshowbarker
2024-07-17 01:12:07 +09:00
Author: https://github.com/BertalanD
Commit: 286984750e
Pull-request: https://github.com/SerenityOS/serenity/pull/20490
Reviewed-by: https://github.com/awesomekling ✅
12 changed files with 22 additions and 37 deletions
|
@ -28,7 +28,7 @@ ssize_t pwritev(int fd, struct iovec const* iov, int iov_count, off_t offset)
|
|||
{
|
||||
__pthread_maybe_cancel();
|
||||
|
||||
int rc = syscall(SC_pwritev, fd, iov, iov_count, &offset);
|
||||
int rc = syscall(SC_pwritev, fd, iov, iov_count, offset);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue