Thomas Haller 5609370de9 gbitlock: add g_pointer_bit_lock_and_get()
Usually, after g_pointer_bit_lock() we want to read the pointer that we
have. In many cases, when we g_pointer_bit_lock() a pointer, we can
access it afterwards without atomic, as nobody is going to modify the
pointer then.

However, gdataset also supports g_datalist_set_flags(), so the pointer
may change at any time and we must always use atomics to read it. For
that reason, g_datalist_lock_and_get() does an atomic read right after
g_pointer_bit_lock().

g_pointer_bit_lock() can easily access the value that it just set. Add
g_pointer_bit_lock_and_get() which can return the value that gets set
afterwards.

Aside from saving the second atomic-get in certain scenarios, the
returned value is also atomically the one that we just set.
2024-01-16 12:50:31 +01:00
..
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-11-02 16:30:23 +00:00
2023-11-02 16:30:23 +00:00
2022-05-23 09:19:45 -04:00
2023-10-11 17:38:31 +01:00
2023-11-28 13:52:05 +00:00
2023-11-15 11:09:39 +00:00
2023-11-15 11:09:39 +00:00
2023-11-28 13:52:05 +00:00
2023-11-15 11:09:39 +00:00
2023-10-23 10:25:31 +01:00
2023-11-28 13:52:05 +00:00
2023-02-09 13:36:51 +00:00
2018-01-04 22:19:30 +01:00
2023-07-21 18:40:13 +01:00
2022-07-25 22:30:22 +01:00
2023-11-28 13:52:05 +00:00
2021-09-21 09:41:29 +00:00
2023-11-21 12:55:55 +00:00
2021-11-18 14:32:09 +00:00
2023-10-11 17:38:31 +01:00
2023-10-11 17:38:31 +01:00
2023-10-23 10:25:31 +01:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-10-11 17:38:30 +01:00
2023-10-11 17:38:31 +01:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-05-16 11:27:45 +01:00
2023-10-23 10:25:31 +01:00
2023-10-23 10:25:31 +01:00
2023-10-11 17:38:31 +01:00
2023-10-23 10:25:31 +01:00
2023-11-28 13:52:05 +00:00
2023-10-17 22:59:27 +01:00
2023-10-17 22:59:27 +01:00
2023-10-11 17:38:31 +01:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-11-28 13:52:05 +00:00
2023-08-01 15:33:21 -03:00