]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Do pthread_atter_{set,get}scope.
authorJulian Seward <jseward@acm.org>
Sun, 2 Jun 2002 09:29:31 +0000 (09:29 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 2 Jun 2002 09:29:31 +0000 (09:29 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@360

coregrind/arch/x86-linux/vg_libpthread.c
coregrind/arch/x86-linux/vg_libpthread_unimp.c
coregrind/vg_libpthread.c
coregrind/vg_libpthread_unimp.c
vg_libpthread.c
vg_libpthread_unimp.c

index 953f3d146fd85123c5d8c4ecb83bda5cfeb67f4e..56f435bece185fac17056c531356f3902acd00e8 100644 (file)
@@ -269,6 +269,25 @@ int pthread_attr_destroy(pthread_attr_t *attr)
    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.
index de92468019ecc14d72349f82949552c10b5f4389..b5d1349e2c5065a65aa2cf4a66de7effc562d48a 100644 (file)
@@ -86,13 +86,13 @@ void pthread_attr_getdetachstate ( void )  { unimp("pthread_attr_getdetachstate"
 void pthread_attr_getinheritsched ( void )  { unimp("pthread_attr_getinheritsched"); }
 //void pthread_attr_getschedparam ( void )  { unimp("pthread_attr_getschedparam"); }
 void pthread_attr_getschedpolicy ( void )  { unimp("pthread_attr_getschedpolicy"); }
-void pthread_attr_getscope ( void )  { unimp("pthread_attr_getscope"); }
+//void pthread_attr_getscope ( void )  { unimp("pthread_attr_getscope"); }
 
 //void pthread_attr_setdetachstate ( void )  { unimp("pthread_attr_setdetachstate"); }
 //void pthread_attr_setinheritsched ( void )  { unimp("pthread_attr_setinheritsched"); }
 //void pthread_attr_setschedparam ( void )  { unimp("pthread_attr_setschedparam"); }
 void pthread_attr_setschedpolicy ( void )  { unimp("pthread_attr_setschedpolicy"); }
-void pthread_attr_setscope ( void )  { unimp("pthread_attr_setscope"); }
+//void pthread_attr_setscope ( void )  { unimp("pthread_attr_setscope"); }
 void pthread_barrier_destroy ( void )  { unimp("pthread_barrier_destroy"); }
 void pthread_barrier_init ( void )  { unimp("pthread_barrier_init"); }
 void pthread_barrier_wait ( void )  { unimp("pthread_barrier_wait"); }
index 953f3d146fd85123c5d8c4ecb83bda5cfeb67f4e..56f435bece185fac17056c531356f3902acd00e8 100644 (file)
@@ -269,6 +269,25 @@ int pthread_attr_destroy(pthread_attr_t *attr)
    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.
index de92468019ecc14d72349f82949552c10b5f4389..b5d1349e2c5065a65aa2cf4a66de7effc562d48a 100644 (file)
@@ -86,13 +86,13 @@ void pthread_attr_getdetachstate ( void )  { unimp("pthread_attr_getdetachstate"
 void pthread_attr_getinheritsched ( void )  { unimp("pthread_attr_getinheritsched"); }
 //void pthread_attr_getschedparam ( void )  { unimp("pthread_attr_getschedparam"); }
 void pthread_attr_getschedpolicy ( void )  { unimp("pthread_attr_getschedpolicy"); }
-void pthread_attr_getscope ( void )  { unimp("pthread_attr_getscope"); }
+//void pthread_attr_getscope ( void )  { unimp("pthread_attr_getscope"); }
 
 //void pthread_attr_setdetachstate ( void )  { unimp("pthread_attr_setdetachstate"); }
 //void pthread_attr_setinheritsched ( void )  { unimp("pthread_attr_setinheritsched"); }
 //void pthread_attr_setschedparam ( void )  { unimp("pthread_attr_setschedparam"); }
 void pthread_attr_setschedpolicy ( void )  { unimp("pthread_attr_setschedpolicy"); }
-void pthread_attr_setscope ( void )  { unimp("pthread_attr_setscope"); }
+//void pthread_attr_setscope ( void )  { unimp("pthread_attr_setscope"); }
 void pthread_barrier_destroy ( void )  { unimp("pthread_barrier_destroy"); }
 void pthread_barrier_init ( void )  { unimp("pthread_barrier_init"); }
 void pthread_barrier_wait ( void )  { unimp("pthread_barrier_wait"); }
index 953f3d146fd85123c5d8c4ecb83bda5cfeb67f4e..56f435bece185fac17056c531356f3902acd00e8 100644 (file)
@@ -269,6 +269,25 @@ int pthread_attr_destroy(pthread_attr_t *attr)
    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.
index de92468019ecc14d72349f82949552c10b5f4389..b5d1349e2c5065a65aa2cf4a66de7effc562d48a 100644 (file)
@@ -86,13 +86,13 @@ void pthread_attr_getdetachstate ( void )  { unimp("pthread_attr_getdetachstate"
 void pthread_attr_getinheritsched ( void )  { unimp("pthread_attr_getinheritsched"); }
 //void pthread_attr_getschedparam ( void )  { unimp("pthread_attr_getschedparam"); }
 void pthread_attr_getschedpolicy ( void )  { unimp("pthread_attr_getschedpolicy"); }
-void pthread_attr_getscope ( void )  { unimp("pthread_attr_getscope"); }
+//void pthread_attr_getscope ( void )  { unimp("pthread_attr_getscope"); }
 
 //void pthread_attr_setdetachstate ( void )  { unimp("pthread_attr_setdetachstate"); }
 //void pthread_attr_setinheritsched ( void )  { unimp("pthread_attr_setinheritsched"); }
 //void pthread_attr_setschedparam ( void )  { unimp("pthread_attr_setschedparam"); }
 void pthread_attr_setschedpolicy ( void )  { unimp("pthread_attr_setschedpolicy"); }
-void pthread_attr_setscope ( void )  { unimp("pthread_attr_setscope"); }
+//void pthread_attr_setscope ( void )  { unimp("pthread_attr_setscope"); }
 void pthread_barrier_destroy ( void )  { unimp("pthread_barrier_destroy"); }
 void pthread_barrier_init ( void )  { unimp("pthread_barrier_init"); }
 void pthread_barrier_wait ( void )  { unimp("pthread_barrier_wait"); }