aboutsummaryrefslogtreecommitdiffstats
path: root/router
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-07-01 15:25:39 -0700
committerChris Robinson <[email protected]>2017-07-01 15:25:39 -0700
commit958fa342726666075c3a601d7a9cc62806268d5d (patch)
treefb862a6554442bbdbab926ecfa237bab370a98b9 /router
parentaf626fdded7b3dd7dec40e2cb52bb4b6aaa4556e (diff)
Use a weaker memory order for the current context iface
Diffstat (limited to 'router')
-rw-r--r--router/al.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/router/al.c b/router/al.c
index d0ded62d..7af7168a 100644
--- a/router/al.c
+++ b/router/al.c
@@ -9,16 +9,16 @@
ATOMIC(DriverIface*) CurrentCtxDriver = ATOMIC_INIT_STATIC(NULL);
-#define DECL_THUNK1(R, n, T1) AL_API R AL_APIENTRY n(T1 a) \
-{ return ATOMIC_LOAD_SEQ(&CurrentCtxDriver)->n(a); }
-#define DECL_THUNK2(R, n, T1, T2) AL_API R AL_APIENTRY n(T1 a, T2 b) \
-{ return ATOMIC_LOAD_SEQ(&CurrentCtxDriver)->n(a, b); }
-#define DECL_THUNK3(R, n, T1, T2, T3) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c)\
-{ return ATOMIC_LOAD_SEQ(&CurrentCtxDriver)->n(a, b, c); }
-#define DECL_THUNK4(R, n, T1, T2, T3, T4) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d) \
-{ return ATOMIC_LOAD_SEQ(&CurrentCtxDriver)->n(a, b, c, d); }
-#define DECL_THUNK5(R, n, T1, T2, T3, T4, T5) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d, T5 e)\
-{ return ATOMIC_LOAD_SEQ(&CurrentCtxDriver)->n(a, b, c, d, e); }
+#define DECL_THUNK1(R,n,T1) AL_API R AL_APIENTRY n(T1 a) \
+{ return ATOMIC_LOAD(&CurrentCtxDriver, almemory_order_acquire)->n(a); }
+#define DECL_THUNK2(R,n,T1,T2) AL_API R AL_APIENTRY n(T1 a, T2 b) \
+{ return ATOMIC_LOAD(&CurrentCtxDriver, almemory_order_acquire)->n(a, b); }
+#define DECL_THUNK3(R,n,T1,T2,T3) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c) \
+{ return ATOMIC_LOAD(&CurrentCtxDriver, almemory_order_acquire)->n(a, b, c); }
+#define DECL_THUNK4(R,n,T1,T2,T3,T4) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d) \
+{ return ATOMIC_LOAD(&CurrentCtxDriver, almemory_order_acquire)->n(a, b, c, d); }
+#define DECL_THUNK5(R,n,T1,T2,T3,T4,T5) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d, T5 e) \
+{ return ATOMIC_LOAD(&CurrentCtxDriver, almemory_order_acquire)->n(a, b, c, d, e); }
/* Ugly hack for some apps calling alGetError without a current context, and
@@ -26,7 +26,7 @@ ATOMIC(DriverIface*) CurrentCtxDriver = ATOMIC_INIT_STATIC(NULL);
*/
AL_API ALenum AL_APIENTRY alGetError(void)
{
- DriverIface *iface = ATOMIC_LOAD_SEQ(&CurrentCtxDriver);
+ DriverIface *iface = ATOMIC_LOAD(&CurrentCtxDriver, almemory_order_acquire);
if(iface) return iface->alGetError();
return AL_NO_ERROR;
}