summaryrefslogtreecommitdiff
path: root/src/mpfr-impl.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-05-28 11:11:31 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-05-28 11:11:31 +0000
commitc73d5d6d548ad99ada57b507e1ea19a7bcfbb519 (patch)
treefdd98fcdf5e1f4608be726f6c283f40bd6f43584 /src/mpfr-impl.h
parent24cfcf1086269fd2372d4145df694a43cd1ed428 (diff)
downloadmpfr-c73d5d6d548ad99ada57b507e1ea19a7bcfbb519.tar.gz
[src] Fixed allocation issue for multithreaded applications:
https://sympa.inria.fr/sympa/arc/mpfr/2015-05/msg00001.html * mpfr-gmp.{c,h}: made mpfr_allocate_func, mpfr_reallocate_func and mpfr_free_func thread-local; updated MPFR_GET_MEMFUNC to execute mp_get_memory_functions only when these pointers have not been set to the actual function pointers yet. * mpfr-impl.h: #include "mpfr-thread.h" earlier (before mpfr-gmp.h, where MPFR_THREAD_ATTR is now used). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9466 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mpfr-impl.h')
-rw-r--r--src/mpfr-impl.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h
index 0caec6f18..97cd869b3 100644
--- a/src/mpfr-impl.h
+++ b/src/mpfr-impl.h
@@ -70,6 +70,11 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
# include "config.h"
#endif
+/* For the definition of MPFR_THREAD_ATTR. GCC/ICC detection macros are
+ no longer used, as they sometimes gave incorrect information about
+ the support of thread-local variables. A configure check is now done. */
+#include "mpfr-thread.h"
+
#ifdef MPFR_HAVE_GMP_IMPL /* Build with gmp internals */
# include "gmp.h"
@@ -125,11 +130,6 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
************** Attributes definition *****************
******************************************************/
-/* For the definition of MPFR_THREAD_ATTR. GCC/ICC detection macros are
- no longer used, as they sometimes gave incorrect information about
- the support of thread-local variables. A configure check is now done. */
-#include "mpfr-thread.h"
-
#if defined(MPFR_HAVE_NORETURN)
/* _Noreturn is specified by ISO C11 (Section 6.7.4);
in GCC, it is supported as of version 4.7. */