In gatomic.c
of glib there are several function declarations that look like this:
gboolean
(g_atomic_int_compare_and_exchange_full) (gint *atomic,
gint oldval,
gint newval,
gint *preval)
{
return g_atomic_int_compare_and_exchange_full (atomic, oldval, newval, preval);
}
Can someone explain what this code exactly does? I'm confused by several things here:
The function name
g_atomic_int_compare_and_exchange_full
is in parentheses. What's the significance of this?The function's body apparently consists of nothing but a call to the function itself so this will run forever and result in stack overflow (pun intended).
I can't make any sense of this function declaration at all. What's really going on here?