diff options
Diffstat (limited to 'include/atomic')
-rw-r--r-- | include/atomic/gcc_builtins.h | 5 | ||||
-rw-r--r-- | include/atomic/nolock.h | 4 | ||||
-rw-r--r-- | include/atomic/rwlock.h | 4 | ||||
-rw-r--r-- | include/atomic/x86-gcc.h | 4 |
4 files changed, 17 insertions, 0 deletions
diff --git a/include/atomic/gcc_builtins.h b/include/atomic/gcc_builtins.h index 509701b30a5..01ebc38707e 100644 --- a/include/atomic/gcc_builtins.h +++ b/include/atomic/gcc_builtins.h @@ -1,3 +1,6 @@ +#ifndef ATOMIC_GCC_BUILTINS_INCLUDED +#define ATOMIC_GCC_BUILTINS_INCLUDED + /* Copyright (C) 2008 MySQL AB This program is free software; you can redistribute it and/or modify @@ -31,3 +34,5 @@ #define make_atomic_store_body(S) \ (void) __sync_lock_test_and_set(a, v); #endif + +#endif /* ATOMIC_GCC_BUILTINS_INCLUDED */ diff --git a/include/atomic/nolock.h b/include/atomic/nolock.h index 10ac17884b6..2c652fd52c1 100644 --- a/include/atomic/nolock.h +++ b/include/atomic/nolock.h @@ -1,3 +1,6 @@ +#ifndef ATOMIC_NOLOCK_INCLUDED +#define ATOMIC_NOLOCK_INCLUDED + /* Copyright (C) 2006 MySQL AB This program is free software; you can redistribute it and/or modify @@ -42,3 +45,4 @@ typedef struct { } my_atomic_rwlock_t; #endif +#endif /* ATOMIC_NOLOCK_INCLUDED */ diff --git a/include/atomic/rwlock.h b/include/atomic/rwlock.h index 18b77e93d80..0ff4d16c545 100644 --- a/include/atomic/rwlock.h +++ b/include/atomic/rwlock.h @@ -1,3 +1,6 @@ +#ifndef ATOMIC_RWLOCK_INCLUDED +#define ATOMIC_RWLOCK_INCLUDED + /* Copyright (C) 2006 MySQL AB This program is free software; you can redistribute it and/or modify @@ -46,3 +49,4 @@ typedef struct {pthread_rwlock_t rw;} my_atomic_rwlock_t; #define make_atomic_load_body(S) ret= *a; #define make_atomic_store_body(S) *a= v; +#endif /* ATOMIC_RWLOCK_INCLUDED */ diff --git a/include/atomic/x86-gcc.h b/include/atomic/x86-gcc.h index d79dadbf05e..d8afa5bfbf1 100644 --- a/include/atomic/x86-gcc.h +++ b/include/atomic/x86-gcc.h @@ -1,3 +1,6 @@ +#ifndef ATOMIC_X86_GCC_INCLUDED +#define ATOMIC_X86_GCC_INCLUDED + /* Copyright (C) 2006 MySQL AB This program is free software; you can redistribute it and/or modify @@ -56,3 +59,4 @@ asm volatile ("; xchg %0, %1;" : "+m" (*a) : "r" (v)) #endif +#endif /* ATOMIC_X86_GCC_INCLUDED */ |