Skip to content

Commit 91166d0

Browse files
committed
Note on correctness
On SMP PowerPC (G5), the volatile fallback is technically weaker than true release/acquire — you'd want an lwsync to get real ordering. But: (a) the thumbnail status is a single int, aligned, (b) the failure mode is at worst a fade-in animation starting one frame late, not corruption, and (c) the author's own comment acknowledges this tradeoff ("Platforms with weak ordering that lack GCC builtins do not run threaded video in practice"). Single-core G4 is fine. If you specifically want to harden the G5 path later, the right tool is __sync_synchronize() — which did exist in GCC 4.1 — but that's an enhancement, not a blocker for getting the build green.
1 parent feec88c commit 91166d0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gfx/gfx_thumbnail.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
* and x86. Platforms with weak ordering that lack GCC
6060
* builtins do not run threaded video in practice.
6161
*/
62-
#if defined(__GNUC__)
62+
#if defined(__clang__) || (defined(__GNUC__) && \
63+
((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))
6364
#define GFX_THUMB_STATUS_STORE(ptr, val) \
6465
__atomic_store_n((int*)(ptr), (int)(val), __ATOMIC_RELEASE)
6566
#define GFX_THUMB_STATUS_LOAD(ptr) \

0 commit comments

Comments
 (0)