Implement (nop, but that's OK according to POSIX) pthread_set_concurrency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1355 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c
index 47d02da..deaeab7 100644
--- a/coregrind/arch/x86-linux/vg_libpthread.c
+++ b/coregrind/arch/x86-linux/vg_libpthread.c
@@ -513,6 +513,15 @@
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 b727f2f..1b986d9 100644
--- a/coregrind/arch/x86-linux/vg_libpthread_unimp.c
+++ b/coregrind/arch/x86-linux/vg_libpthread_unimp.c
@@ -253,8 +253,8 @@
{ 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 47d02da..deaeab7 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -513,6 +513,15 @@
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 b727f2f..1b986d9 100644
--- a/coregrind/vg_libpthread_unimp.c
+++ b/coregrind/vg_libpthread_unimp.c
@@ -253,8 +253,8 @@
{ 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 )