Skip to content

Instantly share code, notes, and snippets.

@cheatfate
Created March 18, 2017 23:16
Show Gist options
  • Save cheatfate/8e9844eb5985f59276d48e16093a917d to your computer and use it in GitHub Desktop.
Save cheatfate/8e9844eb5985f59276d48e16093a917d to your computer and use it in GitHub Desktop.
static N_INLINE(NI, atomicInc_z4A2GBHreJM5Dq9aEBQ9cQUQsystem)(NI* memLoc, NI x) {
NI result;
result = (NI)0;
result = _InterlockedExchangeAdd(memLoc, x);
return result;
}
static N_INLINE(NI, atomicDec_z4A2GBHreJM5Dq9aEBQ9cQUQ_2system)(NI* memLoc, NI x) {
NI result;
result = (NI)0;
result = _InterlockedExchangeAdd(memLoc, ((NI64)-(x)));
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment