]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Implement tcdrain in the pthread library. The fact that this function
authorTom Hughes <tom@compton.nu>
Wed, 31 Mar 2004 15:23:13 +0000 (15:23 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 31 Mar 2004 15:23:13 +0000 (15:23 +0000)
is missing was reported in bug #70344 but the reporter then closed the
bug saying that they were using the wrong version of valgrind.

Patch from Henrik Algestam <algestam@home.se>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2346

coregrind/vg_libpthread.c
coregrind/vg_libpthread_unimp.c

index 214dc92ab12d8aaeeffa1d425475c46dc066282c..339808a5c364ded10053249784a43e13811bcf76 100644 (file)
@@ -2205,6 +2205,16 @@ int __pause(void)
 }
 
 
+extern
+int __libc_tcdrain(int fd);
+WEAK
+int __tcdrain(int fd)
+{
+   __my_pthread_testcancel();
+   return __libc_tcdrain(fd);
+}
+
+
 extern
 int __libc_fsync(int fd);
 WEAK
@@ -2383,6 +2393,7 @@ weak_alias (__pread64, pread64)
 weak_alias (__pwrite64, pwrite64)
 weak_alias(__nanosleep, nanosleep)
 weak_alias(__pause, pause)
+weak_alias(__tcdrain, tcdrain)
 
 
 extern  
index 92259e3c37d2bed64d0c1431b086456318a1136b..f906023274d49ce0861ec3878a9ba6947f6bb3aa 100644 (file)
@@ -220,7 +220,7 @@ weak_alias(_IO_ftrylockfile, ftrylockfile)
 //__attribute__((weak)) void recvfrom ( void ) { vgPlain_unimp("recvfrom"); }
 //__attribute__((weak)) void recvmsg ( void ) { vgPlain_unimp("recvmsg"); }
 //__attribute__((weak)) void sendmsg ( void ) { vgPlain_unimp("sendmsg"); }
-__attribute__((weak)) void tcdrain ( void ) { vgPlain_unimp("tcdrain"); }
+//__attribute__((weak)) void tcdrain ( void ) { vgPlain_unimp("tcdrain"); }
 //--//__attribute__((weak)) void vfork ( void ) { vgPlain_unimp("vfork"); }
 
 //__attribute__((weak)) void pthread_attr_getguardsize ( void )