Browse Source

Merge branch 'etamme-master'

Closes #76
changes/69/2669/1
Richard Fuchs 10 years ago
parent
commit
247b580858
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      daemon/aux.h

+ 22
- 0
daemon/aux.h View File

@ -20,6 +20,28 @@
#include "compat.h" #include "compat.h"
#include <openssl/rand.h> #include <openssl/rand.h>
#if !(GLIB_CHECK_VERSION(2,30,0))
#define g_atomic_int_and(atomic, val) \
(G_GNUC_EXTENSION ({ \
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
(void) (0 ? *(atomic) ^ (val) : 0); \
(guint) __sync_fetch_and_and ((atomic), (val)); \
}))
#define g_atomic_int_or(atomic, val) \
(G_GNUC_EXTENSION ({ \
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
(void) (0 ? *(atomic) ^ (val) : 0); \
(guint) __sync_fetch_and_or ((atomic), (val)); \
}))
#define g_atomic_pointer_add(atomic, val) \
(G_GNUC_EXTENSION ({ \
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
(void) (0 ? (gpointer) *(atomic) : 0); \
(void) (0 ? (val) ^ (val) : 0); \
(gssize) __sync_fetch_and_add ((atomic), (val)); \
}))
#endif
#if 0 && defined(__DEBUG) #if 0 && defined(__DEBUG)
#define __THREAD_DEBUG 1 #define __THREAD_DEBUG 1
#endif #endif


Loading…
Cancel
Save