From feb1821809ba241034bd87d277c2ccff557aea73 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Tue, 15 Mar 2005 21:00:44 +0000 Subject: [PATCH] new define DEAL_VOLATILE git-svn-id: https://svn.dealii.org/trunk@10162 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/config.h.in | 12 ++++++++++++ deal.II/configure.in | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in index 2ae411434b..f2dd8d4d29 100644 --- a/deal.II/base/include/base/config.h.in +++ b/deal.II/base/include/base/config.h.in @@ -274,6 +274,18 @@ #undef __PRETTY_FUNCTION__ +/** + * Depending on the use of threads, we will have to make some variables + * volatile. We do this here in a very old-fashioned C-style, but still + * convenient way. + */ +#ifdef DEAL_II_USE_MT +# define DEAL_VOLATILE volatile +#else +# define DEAL_VOLATILE +#endif + + /** * Have a namespace into which we declare some numeric constants, such * as pi. Unfortunately, these are not always available, on all systems diff --git a/deal.II/configure.in b/deal.II/configure.in index 0eed55bc41..6c7a4259e2 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -505,6 +505,18 @@ AH_TOP( AH_BOTTOM( [ +/** + * Depending on the use of threads, we will have to make some variables + * volatile. We do this here in a very old-fashioned C-style, but still + * convenient way. + */ +#ifdef DEAL_II_USE_MT +# define DEAL_VOLATILE volatile +#else +# define DEAL_VOLATILE +#endif + + /** * Have a namespace into which we declare some numeric constants, such * as pi. Unfortunately, these are not always available, on all systems -- 2.39.5