move _Atomic define to common.h
authorzhiyong.dang <zhiyong.dang@ck-telecom.com>
Fri, 11 May 2018 07:13:16 +0000 (00:13 -0700)
committerzhiyong.dang <zhiyong.dang@ck-telecom.com>
Fri, 11 May 2018 07:13:16 +0000 (00:13 -0700)
common.h
driver/others/blas_server_omp.c

index 86c33b2..123e3de 100644 (file)
--- a/common.h
+++ b/common.h
@@ -649,6 +649,12 @@ int omp_get_num_procs(void);
 __declspec(dllimport) int __cdecl omp_in_parallel(void);
 __declspec(dllimport) int __cdecl omp_get_num_procs(void);
 #endif
+#if (__STDC_VERSION__ >= 201112L)
+#ifndef _Atomic
+#define _Atomic volatile
+#endif
+#include <stdatomic.h>
+#endif
 #else
 #ifdef __ELF__
 int omp_in_parallel  (void) __attribute__ ((weak));
index cc00092..fccdb43 100644 (file)
 /* or implied, of The University of Texas at Austin.                 */
 /*********************************************************************/
 
-#if __STDC_VERSION__ >= 201112L
-#ifndef _Atomic
-#define _Atomic volatile
-#endif
-#include <stdatomic.h>
-#endif
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>