summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2020-12-20 12:45:01 -0800
committerlhchavez <lhchavez@lhchavez.com>2021-08-26 05:34:17 -0700
commit74708a813d586df3ba22a81b475f6aba0498e2ef (patch)
treef3de0ceb6e03e1b4453762864c51330e05584d7d /include/git2
parentfabacb7c6506f0cfb4cb29031855e50f00664b6b (diff)
downloadlibgit2-74708a813d586df3ba22a81b475f6aba0498e2ef.tar.gz
Homogenize semantics for atomic-related functions
There were some subtle semantic differences between the various implementations of atomic functions. Now they behave the same, have tests and are better documented to avoid this from happening again in the future. Of note: * The semantics chosen for `git_atomic_compare_and_swap` match `InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now. * The semantics chosen for `git_atomic_add` match `InterlockedAdd`/`__atomic_add_fetch`. * `git_atomic_swap` and `git_atomic_load` still have a bit of semantic difference with the gcc builtins / msvc interlocked operations, since they require an l-value (not a pointer). If desired, this can be homogenized.
Diffstat (limited to 'include/git2')
0 files changed, 0 insertions, 0 deletions