]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
More minor fixes to make OpenOffice 1.0 work.
authorJulian Seward <jseward@acm.org>
Fri, 24 May 2002 02:11:32 +0000 (02:11 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 24 May 2002 02:11:32 +0000 (02:11 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@321

coregrind/arch/x86-linux/vg_libpthread.c
coregrind/arch/x86-linux/vg_libpthread_unimp.c
coregrind/vg_libpthread.c
coregrind/vg_libpthread_unimp.c
vg_libpthread.c
vg_libpthread_unimp.c
vg_syscall_mem.c

index 6cd7e40d0cf91166c417c386cdbe5068b7953b04..45d99a9b2d6833c1d6e9b3615212e8cabfdc4a6b 100644 (file)
@@ -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
index 1458dc2fa4b3e513917bf7f2a015929cc4bf64bd..16b251ecbb0affcc1cf8a426651fc298ac6f447f 100644 (file)
@@ -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"); }
index 6cd7e40d0cf91166c417c386cdbe5068b7953b04..45d99a9b2d6833c1d6e9b3615212e8cabfdc4a6b 100644 (file)
@@ -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
index 1458dc2fa4b3e513917bf7f2a015929cc4bf64bd..16b251ecbb0affcc1cf8a426651fc298ac6f447f 100644 (file)
@@ -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"); }
index 6cd7e40d0cf91166c417c386cdbe5068b7953b04..45d99a9b2d6833c1d6e9b3615212e8cabfdc4a6b 100644 (file)
@@ -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
index 1458dc2fa4b3e513917bf7f2a015929cc4bf64bd..16b251ecbb0affcc1cf8a426651fc298ac6f447f 100644 (file)
@@ -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"); }
index 34c43baa67277bc2a06b93db9ed14328f8811ea5..bb7c84cac48faeb13acca83ed8d64c0807fcdf78 100644 (file)
@@ -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: 
       {