From: Jürg Billeter Date: Fri, 12 Aug 2011 09:03:47 +0000 (+0200) Subject: glib-2.0: Ensure to use volatile modifier for atomic operations X-Git-Tag: 0.13.2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baabed917784ba67a3a30ac8952504163005dc37;p=thirdparty%2Fvala.git glib-2.0: Ensure to use volatile modifier for atomic operations --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index f0ed5a9ff..59656857a 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -1607,19 +1607,19 @@ namespace GLib { /* Atomic Operations */ namespace AtomicInt { - public static int get (ref int atomic); - public static void set (ref int atomic, int newval); - public static void add (ref int atomic, int val); - public static int exchange_and_add (ref int atomic, int val); - public static bool compare_and_exchange (ref int atomic, int oldval, int newval); - public static void inc (ref int atomic); - public static bool dec_and_test (ref int atomic); + public static int get ([CCode (type = "volatile gint *")] ref int atomic); + public static void set ([CCode (type = "volatile gint *")] ref int atomic, int newval); + public static void add ([CCode (type = "volatile gint *")] ref int atomic, int val); + public static int exchange_and_add ([CCode (type = "volatile gint *")] ref int atomic, int val); + public static bool compare_and_exchange ([CCode (type = "volatile gint *")] ref int atomic, int oldval, int newval); + public static void inc ([CCode (type = "volatile gint *")] ref int atomic); + public static bool dec_and_test ([CCode (type = "volatile gint *")] ref int atomic); } namespace AtomicPointer { - public static void* get (void** atomic); - public static void set (void** atomic, void* newval); - public static bool compare_and_exchange (void** atomic, void* oldval, void* newval); + public static void* get ([CCode (type = "volatile gpointer *")] void** atomic); + public static void set ([CCode (type = "volatile gpointer *")] void** atomic, void* newval); + public static bool compare_and_exchange ([CCode (type = "volatile gpointer *")] void** atomic, void* oldval, void* newval); } /* The Main Event Loop */