File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ extern "C" {
8080#endif
8181
8282#ifndef ASSEMBLER
83- #ifdef HAVE_C11
83+ #if defined( HAVE_C11 ) && !defined( __cplusplus )
8484#if defined(C_GCC ) && ( __GNUC__ < 7 )
8585// workaround for GCC bug 65467
8686#ifndef _Atomic
@@ -447,7 +447,7 @@ please https://github.com/xianyi/OpenBLAS/issues/246
447447#endif
448448
449449#ifndef ASSEMBLER
450- #ifdef HAVE_C11
450+ #if defined( HAVE_C11 ) && !defined( __cplusplus )
451451#define BLAS_LOCK_DEFINED
452452#endif
453453#endif
@@ -579,7 +579,7 @@ static __inline void blas_lock(volatile BLASULONG *address){
579579#define BLAS_LOCK_DEFINED
580580#endif
581581
582- #ifdef HAVE_C11
582+ #if defined( HAVE_C11 ) && !defined( __cplusplus )
583583static __inline void blas_lock (volatile BLASULONG * address ) {
584584 BLASULONG expected = 0 ;
585585 while (!atomic_compare_exchange_strong ((volatile _Atomic BLASULONG * )address ,
@@ -591,7 +591,7 @@ static __inline void blas_lock(volatile BLASULONG *address) {
591591#endif
592592
593593static __inline void blas_unlock (volatile BLASULONG * address ){
594- #ifdef HAVE_C11
594+ #if defined( HAVE_C11 ) && !defined( __cplusplus )
595595 atomic_store ((volatile _Atomic BLASULONG * )address , (BLASULONG )0 );
596596#else
597597 MB ;
You can’t perform that action at this time.
0 commit comments