Function

GLibOnceinit_leave

since: 2.14

Declaration

void
g_once_init_leave (
  void* location,
  gsize result
)

Description

Counterpart to g_once_init_enter(). Expects a location of a static 0-initialized initialization variable, and an initialization value other than 0. Sets the variable to the initialization value, and releases concurrent threads blocking in g_once_init_enter() on this initialization variable.

While location has a volatile qualifier, this is a historical artifact and the pointer passed to it should not be volatile.

Available since: 2.14

Parameters

location

Type: void*

Location of a static initializable variable containing 0

The argument will be modified by the function.
result

Type: gsize

New non-0 value for *value_location.