Do pthread_atter_{set,get}scope.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@360 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c
index 953f3d1..56f435b 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -269,6 +269,25 @@
return 0;
}
+/* These are no-ops, as with LinuxThreads. */
+int pthread_attr_setscope ( pthread_attr_t *attr, int scope )
+{
+ ensure_valgrind("pthread_attr_setscope");
+ if (scope == PTHREAD_SCOPE_SYSTEM)
+ return 0;
+ if (scope == PTHREAD_SCOPE_PROCESS)
+ return ENOTSUP;
+ return EINVAL;
+}
+
+int pthread_attr_getscope ( const pthread_attr_t *attr, int *scope )
+{
+ ensure_valgrind("pthread_attr_setscope");
+ if (scope)
+ *scope = PTHREAD_SCOPE_SYSTEM;
+ return 0;
+}
+
/* ---------------------------------------------------
Helper functions for running a thread
and for clearing up afterwards.