[vala/0.48] glib-2.0: Add AtomicUint, an alternation of AtomicInt for uint



commit 224f31e3af92e89c4a65ba26c9c141760bc0eee6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue May 12 07:28:29 2020 +0200

    glib-2.0: Add AtomicUint, an alternation of AtomicInt for uint
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/915

 vapi/glib-2.0.vapi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 7cb870541..1980a1b65 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -1842,6 +1842,26 @@ namespace GLib {
                public static bool dec_and_test ([CCode (type = "volatile gint *")] ref int atomic);
        }
 
+       [Version (since = "2.4")]
+       namespace AtomicUint {
+               [CCode (cname = "g_atomic_int_get")]
+               public static uint get ([CCode (type = "volatile guint *")] ref uint atomic);
+               [CCode (cname = "g_atomic_int_set")]
+               public static void set ([CCode (type = "volatile guint *")] ref uint atomic, uint newval);
+               [Version (since = "2.30")]
+               [CCode (cname = "g_atomic_int_add")]
+               public static uint add ([CCode (type = "volatile guint *")] ref uint atomic, uint val);
+               [Version (deprecated_since = "2.30", replacement = "add")]
+               [CCode (cname = "g_atomic_int_exchange_and_add")]
+               public static uint exchange_and_add ([CCode (type = "volatile guint *")] ref uint atomic, 
uint val);
+               [CCode (cname = "g_atomic_int_compare_and_exchange")]
+               public static bool compare_and_exchange ([CCode (type = "volatile guint *")] ref uint atomic, 
uint oldval, uint newval);
+               [CCode (cname = "g_atomic_int_inc")]
+               public static void inc ([CCode (type = "volatile guint *")] ref uint atomic);
+               [CCode (cname = "g_atomic_int_dec_and_test")]
+               public static bool dec_and_test ([CCode (type = "volatile guint *")] ref uint atomic);
+       }
+
        [Version (since = "2.4")]
        namespace AtomicPointer {
                public static void* get ([CCode (type = "volatile gpointer *")] void** atomic);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]