gthread: introduce g_once_init_{enter,leave}_pointer

These functions can be used to initalize pointer-type variables rather
than a gsize. This is required to support CHERI-enabled platforms where
gsize cannot be used to store pointers. Follow-up changes will migrate
the uses of g_once_init that store pointers to the new API

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
This commit is contained in:
Alex Richardson
2023-09-11 23:20:23 -07:00
committed by Philip Withnall
parent 9c81ff46a2
commit 726eca7c89
3 changed files with 113 additions and 1 deletions

View File

@@ -782,6 +782,8 @@ G_ONCE_INIT
g_once
g_once_init_enter
g_once_init_leave
g_once_init_enter_pointer
g_once_init_leave_pointer
<SUBSECTION>
g_bit_lock