From: Julian Seward Date: Thu, 16 May 2002 23:39:10 +0000 (+0000) Subject: Cancellation wrapper for pread64. X-Git-Tag: svn/VALGRIND_1_0_3~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1b75f83835ca83fd37d5d99657646de374fae54;p=thirdparty%2Fvalgrind.git Cancellation wrapper for pread64. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@283 --- diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c index 7457dd2d3e..fba83c50ba 100644 --- a/coregrind/arch/x86-linux/vg_libpthread.c +++ b/coregrind/arch/x86-linux/vg_libpthread.c @@ -1115,6 +1115,17 @@ __off64_t lseek64(int fildes, __off64_t offset, int whence) } +extern +ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset); +ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) +{ + return __libc_pread64(__fd, __buf, __nbytes, __offset); +} + + + extern void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn)); /* not weak: __attribute__((weak)) */ @@ -1541,6 +1552,7 @@ strong_alias(write, __write) strong_alias(connect, __connect) strong_alias(send, __send) +weak_alias (__pread64, pread64) weak_alias(__fork, fork) //weak_alias(__vfork, vfork) diff --git a/coregrind/arch/x86-linux/vg_libpthread_unimp.c b/coregrind/arch/x86-linux/vg_libpthread_unimp.c index 4154a335c6..d3a38b2159 100644 --- a/coregrind/arch/x86-linux/vg_libpthread_unimp.c +++ b/coregrind/arch/x86-linux/vg_libpthread_unimp.c @@ -52,7 +52,7 @@ void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); } //void __lseek ( void ) { unimp("__lseek"); } //void __open ( void ) { unimp("__open"); } //void __open64 ( void ) { unimp("__open64"); } -void __pread64 ( void ) { unimp("__pread64"); } +//void __pread64 ( void ) { unimp("__pread64"); } //void __pthread_atfork ( void ) { unimp("__pthread_atfork"); } //void __pthread_getspecific ( void ) { unimp("__pthread_getspecific"); } //void __pthread_key_create ( void ) { unimp("__pthread_key_create"); } @@ -193,7 +193,6 @@ void pthread_attr_init@GLIBC_2.0 ( void ) { unimp("pthread_attr_init@GLIBC_2.0" # define weak_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); -weak_alias (__pread64, pread64) weak_alias (__pwrite64, pwrite64) weak_alias(pthread_rwlock_destroy, __pthread_rwlock_destroy) diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 7457dd2d3e..fba83c50ba 100644 --- a/coregrind/vg_libpthread.c +++ b/coregrind/vg_libpthread.c @@ -1115,6 +1115,17 @@ __off64_t lseek64(int fildes, __off64_t offset, int whence) } +extern +ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset); +ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) +{ + return __libc_pread64(__fd, __buf, __nbytes, __offset); +} + + + extern void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn)); /* not weak: __attribute__((weak)) */ @@ -1541,6 +1552,7 @@ strong_alias(write, __write) strong_alias(connect, __connect) strong_alias(send, __send) +weak_alias (__pread64, pread64) weak_alias(__fork, fork) //weak_alias(__vfork, vfork) diff --git a/coregrind/vg_libpthread_unimp.c b/coregrind/vg_libpthread_unimp.c index 4154a335c6..d3a38b2159 100644 --- a/coregrind/vg_libpthread_unimp.c +++ b/coregrind/vg_libpthread_unimp.c @@ -52,7 +52,7 @@ void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); } //void __lseek ( void ) { unimp("__lseek"); } //void __open ( void ) { unimp("__open"); } //void __open64 ( void ) { unimp("__open64"); } -void __pread64 ( void ) { unimp("__pread64"); } +//void __pread64 ( void ) { unimp("__pread64"); } //void __pthread_atfork ( void ) { unimp("__pthread_atfork"); } //void __pthread_getspecific ( void ) { unimp("__pthread_getspecific"); } //void __pthread_key_create ( void ) { unimp("__pthread_key_create"); } @@ -193,7 +193,6 @@ void pthread_attr_init@GLIBC_2.0 ( void ) { unimp("pthread_attr_init@GLIBC_2.0" # define weak_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); -weak_alias (__pread64, pread64) weak_alias (__pwrite64, pwrite64) weak_alias(pthread_rwlock_destroy, __pthread_rwlock_destroy) diff --git a/vg_libpthread.c b/vg_libpthread.c index 7457dd2d3e..fba83c50ba 100644 --- a/vg_libpthread.c +++ b/vg_libpthread.c @@ -1115,6 +1115,17 @@ __off64_t lseek64(int fildes, __off64_t offset, int whence) } +extern +ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset); +ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) +{ + return __libc_pread64(__fd, __buf, __nbytes, __offset); +} + + + extern void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn)); /* not weak: __attribute__((weak)) */ @@ -1541,6 +1552,7 @@ strong_alias(write, __write) strong_alias(connect, __connect) strong_alias(send, __send) +weak_alias (__pread64, pread64) weak_alias(__fork, fork) //weak_alias(__vfork, vfork) diff --git a/vg_libpthread_unimp.c b/vg_libpthread_unimp.c index 4154a335c6..d3a38b2159 100644 --- a/vg_libpthread_unimp.c +++ b/vg_libpthread_unimp.c @@ -52,7 +52,7 @@ void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); } //void __lseek ( void ) { unimp("__lseek"); } //void __open ( void ) { unimp("__open"); } //void __open64 ( void ) { unimp("__open64"); } -void __pread64 ( void ) { unimp("__pread64"); } +//void __pread64 ( void ) { unimp("__pread64"); } //void __pthread_atfork ( void ) { unimp("__pthread_atfork"); } //void __pthread_getspecific ( void ) { unimp("__pthread_getspecific"); } //void __pthread_key_create ( void ) { unimp("__pthread_key_create"); } @@ -193,7 +193,6 @@ void pthread_attr_init@GLIBC_2.0 ( void ) { unimp("pthread_attr_init@GLIBC_2.0" # define weak_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); -weak_alias (__pread64, pread64) weak_alias (__pwrite64, pwrite64) weak_alias(pthread_rwlock_destroy, __pthread_rwlock_destroy)