Code:
#include <windows.h> /* #includes winbase.h which defines InterlockedAnd, InterlockedExchangeAdd and several others */

gint
(g_atomic_int_add) (volatile gint *atomic,
                    gint           val)
{
  return InterlockedExchangeAdd (atomic, val);
}

guint
(g_atomic_int_and) (volatile guint *atomic,
                    guint           val)
{
  return InterlockedAnd (atomic, val);
}
When linking the above code I get linker error LNK2019 : unresolved external symbol _InterlockedAnd referenced in function g_atomic_int_and. The same error occurs for InterlockedOr and InterlockedXor. However, all the others are fine.

All the others seem to be in kernel32.dll - but InterlockedAnd, InterlockedOr and InterlockedXor are nowhere to be found. It looks like the intention was for them to get inlined but I can't seem to make it work. What am I doing wrong...