Skip to content

gthread: introduce g_once_init_{enter,leave}_pointer

Alexander Richardson requested to merge arichardson/glib:g-once-enter-ptr into main

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.


Use g_once_init_{enter,leave}_pointer where appropriate

This should not result in any functional changes, but will eventually allow glib to be functional on CHERI-enabled systems such as Morello


This was suggested in !3244 (closed)

Edited by Philip Withnall

Merge request reports