diff options
author | 2011-10-16 06:29:56 +0000 | |
---|---|---|
committer | 2011-10-16 06:29:56 +0000 | |
commit | aaac0abe0a28be3acaaffdc7761bba18f946236b (patch) | |
tree | af437155ae30404f4283a857602a300c56507ec8 /lib/libc/sys/pwrite.c | |
parent | Add stubs and manpage for __{get,set}_tcb (diff) | |
download | wireguard-openbsd-aaac0abe0a28be3acaaffdc7761bba18f946236b.tar.xz wireguard-openbsd-aaac0abe0a28be3acaaffdc7761bba18f946236b.zip |
Make consistent the syscall stubs for the syscalls that got special
handling to fix up the alignment of 64bit arguments so that they do
the same dance where _thread_sys_FOO is the real stub and FOO is a
weak alias. For some of them, this is needed for cancellation handling.
From discussions with fgsch@, ok millert@
Diffstat (limited to 'lib/libc/sys/pwrite.c')
-rw-r--r-- | lib/libc/sys/pwrite.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/sys/pwrite.c b/lib/libc/sys/pwrite.c index b49d2fdbd55..8757bf9a272 100644 --- a/lib/libc/sys/pwrite.c +++ b/lib/libc/sys/pwrite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwrite.c,v 1.8 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: pwrite.c,v 1.9 2011/10/16 06:29:56 guenther Exp $ */ /* * Copyright (c) 1992, 1993 @@ -32,15 +32,22 @@ #include <sys/types.h> #include <sys/syscall.h> #include <unistd.h> +#include "thread_private.h" register_t __syscall(quad_t, ...); +/* pread is weak to support libpthread cancellation */ + +STUB_PROTOTYPE(pwrite); + +STUB_ALIAS(pwrite); + /* * This function provides 64-bit offset padding that * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ ssize_t -pwrite(int fd, const void *buf, size_t nbyte, off_t offset) +STUB_NAME(pwrite)(int fd, const void *buf, size_t nbyte, off_t offset) { return (__syscall((quad_t)SYS_pwrite, fd, buf, nbyte, 0, offset)); |