From: Julian Seward Date: Sun, 8 Dec 2002 23:51:32 +0000 (+0000) Subject: Implement (nop, but that's OK according to POSIX) pthread_set_concurrency. X-Git-Tag: svn/VALGRIND_1_9_4~92 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c1de878a10b177df088da777fbcfe07afdbecae;p=thirdparty%2Fvalgrind.git Implement (nop, but that's OK according to POSIX) pthread_set_concurrency. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1355 --- diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c index 47d02da1d9..deaeab7f9d 100644 --- a/coregrind/arch/x86-linux/vg_libpthread.c +++ b/coregrind/arch/x86-linux/vg_libpthread.c @@ -513,6 +513,15 @@ int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) return 0; } +__attribute__((weak)) +int pthread_setconcurrency(int new_level) +{ + if (new_level < 0) + return EINVAL; + else + return 0; +} + /* --------------------------------------------------- Helper functions for running a thread diff --git a/coregrind/arch/x86-linux/vg_libpthread_unimp.c b/coregrind/arch/x86-linux/vg_libpthread_unimp.c index b727f2f60e..1b986d99f2 100644 --- a/coregrind/arch/x86-linux/vg_libpthread_unimp.c +++ b/coregrind/arch/x86-linux/vg_libpthread_unimp.c @@ -253,8 +253,8 @@ __attribute__((weak)) void pthread_mutexattr_setkind_np ( void ) { vgPlain_unimp("pthread_mutexattr_setkind_np"); } __attribute__((weak)) void pthread_mutexattr_setpshared ( void ) { vgPlain_unimp("pthread_mutexattr_setpshared"); } -__attribute__((weak)) void pthread_setconcurrency ( void ) - { vgPlain_unimp("pthread_setconcurrency"); } +//__attribute__((weak)) void pthread_setconcurrency ( void ) +// { vgPlain_unimp("pthread_setconcurrency"); } __attribute__((weak)) void pthread_spin_destroy ( void ) { vgPlain_unimp("pthread_spin_destroy"); } __attribute__((weak)) void pthread_spin_init ( void ) diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 47d02da1d9..deaeab7f9d 100644 --- a/coregrind/vg_libpthread.c +++ b/coregrind/vg_libpthread.c @@ -513,6 +513,15 @@ int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) return 0; } +__attribute__((weak)) +int pthread_setconcurrency(int new_level) +{ + if (new_level < 0) + return EINVAL; + else + return 0; +} + /* --------------------------------------------------- Helper functions for running a thread diff --git a/coregrind/vg_libpthread_unimp.c b/coregrind/vg_libpthread_unimp.c index b727f2f60e..1b986d99f2 100644 --- a/coregrind/vg_libpthread_unimp.c +++ b/coregrind/vg_libpthread_unimp.c @@ -253,8 +253,8 @@ __attribute__((weak)) void pthread_mutexattr_setkind_np ( void ) { vgPlain_unimp("pthread_mutexattr_setkind_np"); } __attribute__((weak)) void pthread_mutexattr_setpshared ( void ) { vgPlain_unimp("pthread_mutexattr_setpshared"); } -__attribute__((weak)) void pthread_setconcurrency ( void ) - { vgPlain_unimp("pthread_setconcurrency"); } +//__attribute__((weak)) void pthread_setconcurrency ( void ) +// { vgPlain_unimp("pthread_setconcurrency"); } __attribute__((weak)) void pthread_spin_destroy ( void ) { vgPlain_unimp("pthread_spin_destroy"); } __attribute__((weak)) void pthread_spin_init ( void )