gatomic.h   gatomic.h 
skipping to change at line 67 skipping to change at line 67
gpointer newval); gpointer newval);
#ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED #ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
# define g_atomic_int_get(atomic) ((gint)*(atomic)) # define g_atomic_int_get(atomic) ((gint)*(atomic))
# define g_atomic_int_set(atomic, newval) ((void) (*(atomic) = (newval ))) # define g_atomic_int_set(atomic, newval) ((void) (*(atomic) = (newval )))
# define g_atomic_pointer_get(atomic) ((gpointer)*(atomic)) # define g_atomic_pointer_get(atomic) ((gpointer)*(atomic))
# define g_atomic_pointer_set(atomic, newval) ((void) (*(atomic) = (newval ))) # define g_atomic_pointer_set(atomic, newval) ((void) (*(atomic) = (newval )))
#else #else
# define g_atomic_int_get(atomic) \ # define g_atomic_int_get(atomic) \
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \
(g_atomic_int_get) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic)) ) (g_atomic_int_get) ((volatile gint G_GNUC_MAY_ALIAS *) (volatile void *) (atomic)))
# define g_atomic_int_set(atomic, newval) \ # define g_atomic_int_set(atomic, newval) \
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \
(g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval))) (g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (volatile void *) (atomic), (newval)))
# define g_atomic_pointer_get(atomic) \ # define g_atomic_pointer_get(atomic) \
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
(g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) ( atomic))) (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void *) (atomic)))
# define g_atomic_pointer_set(atomic, newval) \ # define g_atomic_pointer_set(atomic, newval) \
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
(g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) ( atomic), (newval))) (g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void *) (atomic), (newval)))
#endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */ #endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
/**
* g_atomic_int_inc:
* @atomic: a pointer to an integer.
*
* Atomically increments the integer pointed to by @atomic by 1.
*
* Since: 2.4
*/
#define g_atomic_int_inc(atomic) (g_atomic_int_add ((atomic), 1)) #define g_atomic_int_inc(atomic) (g_atomic_int_add ((atomic), 1))
#define g_atomic_int_dec_and_test(atomic) \
/**
* g_atomic_int_dec_and_test:
* @atomic: a pointer to an integer
*
* Atomically decrements the integer pointed to by @atomic by 1.
*
* Returns: %TRUE if the integer pointed to by @atomic is 0
* after decrementing it
*
* Since: 2.4
*/
#define g_atomic_int_dec_and_test(atomic) \
(g_atomic_int_exchange_and_add ((atomic), -1) == 1) (g_atomic_int_exchange_and_add ((atomic), -1) == 1)
G_END_DECLS G_END_DECLS
#endif /* __G_ATOMIC_H__ */ #endif /* __G_ATOMIC_H__ */
 End of changes. 6 change blocks. 
5 lines changed or deleted 25 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/