Use a typedef to declare extern atomic variables

Some systems use anonymous structs for atomic storage, and extern declarations
need to have the same type as their non-extern definition.
This commit is contained in:
Chris Robinson
2017-10-07 14:58:35 -07:00
parent d57eca57a9
commit b3f7df6f5b
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
#include "router.h"
ATOMIC(DriverIface*) CurrentCtxDriver = ATOMIC_INIT_STATIC(NULL);
atomic_DriverIfacePtr CurrentCtxDriver = ATOMIC_INIT_STATIC(NULL);
#define DECL_THUNK1(R,n,T1) AL_API R AL_APIENTRY n(T1 a) \
{ \
+2 -1
View File
@@ -137,7 +137,8 @@ extern DriverIface *DriverList;
extern int DriverListSize;
extern altss_t ThreadCtxDriver;
extern ATOMIC(DriverIface*) CurrentCtxDriver;
typedef ATOMIC(DriverIface*) atomic_DriverIfacePtr;
extern atomic_DriverIfacePtr CurrentCtxDriver;
typedef struct PtrIntMap {