浏览代码

add missing inline keyword on default a_barrier definition

this is not needed, but may act as a hint to the compiler, and also
serves to suppress unused function warnings if enabled (on by default
since commit 86ac0f794731f03dfff40ee843ff9e2752945d5e).
Rich Felker 1 年之前
父节点
当前提交
fd7d018521
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/internal/atomic.h

+ 1 - 1
src/internal/atomic.h

@@ -194,7 +194,7 @@ static inline void a_store(volatile int *p, int v)
 
 #ifndef a_barrier
 #define a_barrier a_barrier
-static void a_barrier()
+static inline void a_barrier()
 {
 	volatile int tmp = 0;
 	a_cas(&tmp, 0, 0);