From: Julian Seward Date: Fri, 24 May 2002 02:11:32 +0000 (+0000) Subject: More minor fixes to make OpenOffice 1.0 work. X-Git-Tag: svn/VALGRIND_1_0_3~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09846794fc95a0a29a5429dae83ac3b561be8a33;p=thirdparty%2Fvalgrind.git More minor fixes to make OpenOffice 1.0 work. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@321 --- diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c index 6cd7e40d0c..45d99a9b2d 100644 --- a/coregrind/arch/x86-linux/vg_libpthread.c +++ b/coregrind/arch/x86-linux/vg_libpthread.c @@ -1252,6 +1252,14 @@ pid_t wait(int *status) } +extern +int __libc_msync(const void *start, size_t length, int flags); +__attribute__((weak)) +int msync(const void *start, size_t length, int flags) +{ + return __libc_msync(start, length, flags); +} + /* --------------------------------------------------------------------- Nonblocking implementations of select() and poll(). This stuff will diff --git a/coregrind/arch/x86-linux/vg_libpthread_unimp.c b/coregrind/arch/x86-linux/vg_libpthread_unimp.c index 1458dc2fa4..16b251ecbb 100644 --- a/coregrind/arch/x86-linux/vg_libpthread_unimp.c +++ b/coregrind/arch/x86-linux/vg_libpthread_unimp.c @@ -202,7 +202,7 @@ weak_alias(_IO_ftrylockfile, ftrylockfile) //__attribute__((weak)) void pread ( void ) { vgPlain_unimp("pread"); } //__attribute__((weak)) void pwrite ( void ) { vgPlain_unimp("pwrite"); } -__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); } +//__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); } __attribute__((weak)) void pause ( void ) { vgPlain_unimp("pause"); } __attribute__((weak)) void recvfrom ( void ) { vgPlain_unimp("recvfrom"); } __attribute__((weak)) void recvmsg ( void ) { vgPlain_unimp("recvmsg"); } diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 6cd7e40d0c..45d99a9b2d 100644 --- a/coregrind/vg_libpthread.c +++ b/coregrind/vg_libpthread.c @@ -1252,6 +1252,14 @@ pid_t wait(int *status) } +extern +int __libc_msync(const void *start, size_t length, int flags); +__attribute__((weak)) +int msync(const void *start, size_t length, int flags) +{ + return __libc_msync(start, length, flags); +} + /* --------------------------------------------------------------------- Nonblocking implementations of select() and poll(). This stuff will diff --git a/coregrind/vg_libpthread_unimp.c b/coregrind/vg_libpthread_unimp.c index 1458dc2fa4..16b251ecbb 100644 --- a/coregrind/vg_libpthread_unimp.c +++ b/coregrind/vg_libpthread_unimp.c @@ -202,7 +202,7 @@ weak_alias(_IO_ftrylockfile, ftrylockfile) //__attribute__((weak)) void pread ( void ) { vgPlain_unimp("pread"); } //__attribute__((weak)) void pwrite ( void ) { vgPlain_unimp("pwrite"); } -__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); } +//__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); } __attribute__((weak)) void pause ( void ) { vgPlain_unimp("pause"); } __attribute__((weak)) void recvfrom ( void ) { vgPlain_unimp("recvfrom"); } __attribute__((weak)) void recvmsg ( void ) { vgPlain_unimp("recvmsg"); } diff --git a/vg_libpthread.c b/vg_libpthread.c index 6cd7e40d0c..45d99a9b2d 100644 --- a/vg_libpthread.c +++ b/vg_libpthread.c @@ -1252,6 +1252,14 @@ pid_t wait(int *status) } +extern +int __libc_msync(const void *start, size_t length, int flags); +__attribute__((weak)) +int msync(const void *start, size_t length, int flags) +{ + return __libc_msync(start, length, flags); +} + /* --------------------------------------------------------------------- Nonblocking implementations of select() and poll(). This stuff will diff --git a/vg_libpthread_unimp.c b/vg_libpthread_unimp.c index 1458dc2fa4..16b251ecbb 100644 --- a/vg_libpthread_unimp.c +++ b/vg_libpthread_unimp.c @@ -202,7 +202,7 @@ weak_alias(_IO_ftrylockfile, ftrylockfile) //__attribute__((weak)) void pread ( void ) { vgPlain_unimp("pread"); } //__attribute__((weak)) void pwrite ( void ) { vgPlain_unimp("pwrite"); } -__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); } +//__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); } __attribute__((weak)) void pause ( void ) { vgPlain_unimp("pause"); } __attribute__((weak)) void recvfrom ( void ) { vgPlain_unimp("recvfrom"); } __attribute__((weak)) void recvmsg ( void ) { vgPlain_unimp("recvmsg"); } diff --git a/vg_syscall_mem.c b/vg_syscall_mem.c index 34c43baa67..bb7c84cac4 100644 --- a/vg_syscall_mem.c +++ b/vg_syscall_mem.c @@ -417,6 +417,16 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid ) /* !!!!!!!!!! New, untested syscalls !!!!!!!!!!!!!!!!!!!!! */ +# if defined(__NR_msync) /* syscall 144 */ + case __NR_msync: + /* int msync(const void *start, size_t length, int flags); */ + if (VG_(clo_trace_syscalls)) + VG_(printf)("msync ( %p, %d, %d )\n", arg1,arg2,arg3); + must_be_readable( tst, "msync(start)", arg1, arg2 ); + KERNEL_DO_SYSCALL(tid,res); + break; +# endif + # if defined(__NR_getpmsg) /* syscall 188 */ case __NR_getpmsg: {