~codership/galera/2.x

« back to all changes in this revision

Viewing changes to galerautils/src/gu_atomic.h

  • Committer: Alexey Yurchenko
  • Date: 2014-01-29 14:43:26 UTC
  • mto: This revision was merged to the branch mainline in revision 167.
  • Revision ID: alexey.yurchenko@codership.com-20140129144326-aa70nhzofl0smkm8
Fixes:
* provider pause() is fixed to avoid potential deadlock with replicating threads.
* lp:1099478 - handle own address in the address list properly (do not throw exception)
* lp:1259952 - fixed allocation of multiple of pages when posix_fallocate() is unavailable
* lp:1261996 - fixed compilation on Solaris 11
* lp:1232747 - fixed group remerge after partitioning event

Synced with SVN r3450

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2013 Codership Oy <info@codership.com>
 
2
 
 
3
/**
 
4
 * @file Atomic memory access functions. At the moment these are just
 
5
 *       redefinitions from gcc atomic builtins.
 
6
 *
 
7
 */
 
8
 
 
9
#ifndef GU_ATOMIC_H
 
10
#define GU_ATOMIC_H
 
11
 
 
12
#ifdef __GNUC__
 
13
 
 
14
#define gu_sync_fetch_and_add  __sync_fetch_and_add
 
15
#define gu_sync_fetch_and_sub  __sync_fetch_and_sub
 
16
#define gu_sync_fetch_and_or   __sync_fetch_and_or
 
17
#define gu_sync_fetch_and_and  __sync_fetch_and_and
 
18
#define gu_sync_fetch_and_xor  __sync_fetch_and_xor
 
19
#define gu_sync_fetch_and_nand __gu_sync_fetch_and_nand
 
20
 
 
21
 
 
22
#define gu_sync_add_and_fetch  __sync_add_and_fetch
 
23
#define gu_sync_sub_and_fetch  __sync_sub_and_fetch
 
24
#define gu_sync_or_and_fetch   __sync_or_and_fetch
 
25
#define gu_sync_and_and_fetch  __sync_and_and_fetch
 
26
#define gu_sync_xor_and_fetch  __sync_xor_and_fetch
 
27
#define gu_sync_nand_and_fetch __gu_sync_nand_and_fetch
 
28
 
 
29
#else /* __GNUC__ */
 
30
#error "Compiler not supported"
 
31
#endif
 
32
 
 
33
#endif /* !GU_ATOMIC_H */