diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-02-10 15:38:52 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-02-10 15:38:52 (GMT) |
commit | 738661ab9f409b8d961ba1402d6c4dd5f99ecb43 (patch) | |
tree | 01f97a9d10bc3bbe519366197b475efdae2cc8d5 /configure.in | |
parent | 168d67dbd20923feef30fb76c6b569ef2e5add4a (diff) | |
download | hdf5-738661ab9f409b8d961ba1402d6c4dd5f99ecb43.zip hdf5-738661ab9f409b8d961ba1402d6c4dd5f99ecb43.tar.gz hdf5-738661ab9f409b8d961ba1402d6c4dd5f99ecb43.tar.bz2 |
[svn-r6386] Purpose:
Bug fix
Description:
The "system scope" for threads isn't supported on all platforms.
Solution:
Add detection of this feature to the configure script and check for
"H5_HAVE_SYSTEM_SCOPE_THREADS" in the appropriate places.
Platforms tested:
modi4 w/threadsafe
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 8d689e0..7d487e7 100644 --- a/configure.in +++ b/configure.in @@ -1483,6 +1483,37 @@ else fi dnl ---------------------------------------------------------------------- +dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) +dnl is supported on this system +dnl +AC_MSG_CHECKING([Threads support system scope]) +AC_CACHE_VAL(hdf5_cv_system_scope_threads, +AC_TRY_RUN([ +#if STDC_HEADERS +#include <stdlib.h> +#include <pthread.h> +#endif + +int main(void) +{ + pthread_attr_t attribute; + int ret; + + pthread_attr_init(&attribute); + ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); + exit(ret==0 ? 0 : 1); +} +], hdf5_cv_system_scope_threads=yes, hdf5_cv_system_scope_threads=no,)) + +if test ${hdf5_cv_system_scope_threads} = "yes"; then + AC_DEFINE(SYSTEM_SCOPE_THREADS, 1, + [Define if your system supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) call.]) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +dnl ---------------------------------------------------------------------- dnl Checking to see if GPFS is available on this filesystem dnl AC_CHECK_HEADERS([gpfs.h], |