diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ttsafe_cancel.c | 2 | ||||
-rw-r--r-- | test/ttsafe_dcreate.c | 7 | ||||
-rw-r--r-- | test/ttsafe_error.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index 8e47d09..93b3f24 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -62,7 +62,9 @@ void tts_cancel(void) /* make thread scheduling global */ pthread_attr_init(&attribute); +#ifdef H5_HAVE_SYSTEM_SCOPE_THREADS pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); +#endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c index d85dbe7..9a66609 100644 --- a/test/ttsafe_dcreate.c +++ b/test/ttsafe_dcreate.c @@ -87,13 +87,10 @@ void tts_dcreate(void) /* set pthread attribute to perform global scheduling */ ret=pthread_attr_init(&attribute); assert(ret==0); +#ifdef H5_HAVE_SYSTEM_SCOPE_THREADS ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); -/* Don't check return value on FreeBSD, since PTHREAD_SCOPE_SYSTEM is not - * currently supported in v4.7 - */ -#ifndef __FreeBSD__ assert(ret==0); -#endif /* __FreeBSD__ */ +#endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index e911863..284a6e4 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -90,7 +90,9 @@ void tts_error(void) /* make thread scheduling global */ pthread_attr_init(&attribute); +#ifdef H5_HAVE_SYSTEM_SCOPE_THREADS pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); +#endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file |