diff options
Diffstat (limited to 'router')
-rw-r--r-- | router/al.c | 22 |
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; } |