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.
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"); }
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.
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"); }
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.
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"); }