[vala/0.40] glib-2.0: Add AtomicUint, an alternation of AtomicInt for uint
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] glib-2.0: Add AtomicUint, an alternation of AtomicInt for uint
- Date: Thu, 30 Jul 2020 11:02:57 +0000 (UTC)
commit 4bf1aea45249f599b96db6f9599b26dd3024e3f7
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 5784307e0..ce2df7039 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -1779,6 +1779,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]