RecMutex.init

Initializes a #GRecMutex so that it can be used.

This function is useful to initialize a recursive mutex that has been allocated on the stack, or as part of a larger structure.

It is not necessary to initialise a recursive mutex that has been statically allocated.

|[<!-- language="C" --> typedef struct { GRecMutex m; ... } Blob;

Blob *b;

b = g_new (Blob, 1); g_rec_mutex_init (&b->m); ]|

Calling g_rec_mutex_init() on an already initialized #GRecMutex leads to undefined behaviour.

To undo the effect of g_rec_mutex_init() when a recursive mutex is no longer needed, use g_rec_mutex_clear().

class RecMutex
void
init
()

Meta

Since

2.32