summaryrefslogtreecommitdiffstats
path: root/osdep/atomics.h
Commit message (Collapse)AuthorAgeFilesLines
* atomics: add atomic_compare_exchange_strong()wm42014-11-091-0/+11
| | | | | | | | | | | | | | | | As usual, we use C11 semantics, and emulate it if <stdatomic.h> is not available. It's a bit messy with __sync_val_compare_and_swap(). We assume it has "strong" semantics (it can't fail sporadically), but I'm not sure if this is really the case. On the other hand, weak semantics don't seem to be possible, since the builtin can't distinguish between the two failure cases that could occur. Also, to match the C11 interface, use of gcc builtins is unavoidable. Add a check to the build system to make sure the compiler supports them (although I don't think there's any compiler which supports __sync_*, but not these extensions). Needed for the following commit.
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-291-0/+77
bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.