[PATCH] pread/pwrite fix for s390-64.
Martin Schwidefsky
schwidefsky@de.ibm.com
Mon Mar 10 19:21:00 GMT 2003
> > Ok, that explains the compile time error. To enable asynchronous cancel for
> > pread/pwrite/pread64/pwrite64 we still need the small C files to do the
> > LIBC_CANCEL_ASYNC/LIBC_CANCEL_RESET calls, don't we? I think the original
> > patch is valid.
>
> No, the cancelable syscalls are generated using <sysdep-cancel.h>
> instead of <sysdep.h> which takes care of the rest.
Makes sense. I went back to the drawing board and found the real cause for the
pread/pwrite problems on s390-64. It's one of these "how could this ever work" bugs.
The system call numbers of pread and pwrite are defined in linux/include/unistd.h
as __NR_pread64 and __NR_pwrite64. make-syscalls.sh could not find the system
call numbers for pread and pwrite and didn't emit the echos for the PSEUDO
implementation to sysd-syscalls. That's why the generic linux implemenations for
pread and pwrite gets used (and these are wrong for s390-64). The fix is really
simple: correct the system call names for pread/pwrite in syscalls.list.
blue skies,
Martin
2003-03-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Correct system
call names for pread and pwrite.
diff -urN libc/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list libc-s390/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list Mon Mar 10 18:09:02 2003
+++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list Mon Mar 10 18:09:37 2003
@@ -2,8 +2,8 @@
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
-pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
statfs - statfs i:sp __statfs statfs statfs64
getpeername - getpeername i:ipp __getpeername getpeername
More information about the Libc-hacker
mailing list