]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
bind atomic operations, fixes bug 499970
authorJuerg Billeter <j@bitron.ch>
Wed, 28 Nov 2007 16:05:33 +0000 (16:05 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 28 Nov 2007 16:05:33 +0000 (16:05 +0000)
2007-11-28  Juerg Billeter  <j@bitron.ch>

* vapi/glib-2.0.vapi: bind atomic operations, fixes bug 499970

svn path=/trunk/; revision=733

ChangeLog
vapi/glib-2.0.vapi

index 4433fa125527978b1249fe7659abdc4336c33d8f..4f5778b43a6d2a409c118b8dba4b5856025a709d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-28  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/glib-2.0.vapi: bind atomic operations, fixes bug 499970
+
 2007-11-28  Jürg Billeter  <j@bitron.ch>
 
        * vala/parser.y, vala/scanner.l, vala/valafield.vala,
index 6d34c6b259d27f41134c8ed78b6f4cf09342bb25..b96d7ca6efc352636ab35d293df1742736b05f35 100644 (file)
@@ -981,6 +981,24 @@ namespace GLib {
                public static float scalbf (float x, float n);
        }
 
+       /* Atomic Operations */
+
+       public static class 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 class AtomicPointer {
+               public static pointer get (ref pointer atomic);
+               public static void set (ref pointer atomic, pointer newval);
+               public static bool compare_and_exchange (ref pointer atomic, pointer oldval, pointer newval);
+       }
+
        /* The Main Event Loop */
        
        [CCode (ref_function = "g_main_loop_ref", unref_function = "g_main_loop_unref")]