3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-08 07:03:23 +00:00

use C99 pragma

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-05-01 08:34:28 -07:00
parent 78b9f0686a
commit 812c913cdd

View file

@ -191,12 +191,18 @@ bool is_threaded();
} \ } \
} } ((void) 0) } } ((void) 0)
#ifdef _MSC_VER
#define DO_PRAGMA(x) __pragma(x)
#else
#define DO_PRAGMA(x) _Pragma(x)
#endif
#ifdef _NO_OMP_ #ifdef _NO_OMP_
#define LOCK_CODE(CODE) CODE; #define LOCK_CODE(CODE) CODE;
#else #else
#define LOCK_CODE(CODE) \ #define LOCK_CODE(CODE) \
{ \ { \
__pragma(omp critical (verbose_lock)) \ DO_PRAGMA(omp critical (verbose_lock)) \
{ \ { \
CODE; \ CODE; \
} \ } \