comparison Isolated/SimpleMutex.h @ 56:208a9ed20087

Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
author Eric Wing <ewing@anscamobile.com>
date Tue, 29 May 2012 19:43:23 -0700
parents 71b465ff0622
children 36644b1b940b
comparison
equal deleted inserted replaced
55:8b4f80233969 56:208a9ed20087
4 #define SIMPLE_MUTEX_H 4 #define SIMPLE_MUTEX_H
5 5
6 #ifdef __cplusplus 6 #ifdef __cplusplus
7 extern "C" { 7 extern "C" {
8 #endif 8 #endif
9 9
10 #if defined(_WIN32)
11 #if defined(SIMPLE_MUTEX_BUILD_LIBRARY)
12 #define SIMPLE_MUTEX_DECLSPEC __declspec(dllexport)
13 #else
14 #define SIMPLE_MUTEX_DECLSPEC __declspec(dllimport)
15 #endif
16 #else
17 #if defined(SIMPLE_MUTEX_BUILD_LIBRARY)
18 #if defined (__GNUC__) && __GNUC__ >= 4
19 #define SIMPLE_MUTEX_DECLSPEC __attribute__((visibility("default")))
20 #else
21 #define SIMPLE_MUTEX_DECLSPEC
22 #endif
23 #else
24 #define SIMPLE_MUTEX_DECLSPEC
25 #endif
26 #endif
27
28 #if defined(_WIN32)
29 #define SIMPLE_MUTEX_CALL __cdecl
30 #else
31 #define SIMPLE_MUTEX_CALL
32 #endif
10 33
11 typedef struct SimpleMutex SimpleMutex; 34 typedef struct SimpleMutex SimpleMutex;
12 35
13 SimpleMutex* SimpleMutex_CreateMutex(void); 36 extern SIMPLE_MUTEX_DECLSPEC SimpleMutex* SIMPLE_MUTEX_CALL SimpleMutex_CreateMutex(void);
14 void SimpleMutex_DestroyMutex(SimpleMutex* simple_mutex); 37 extern SIMPLE_MUTEX_DECLSPEC void SIMPLE_MUTEX_CALL SimpleMutex_DestroyMutex(SimpleMutex* simple_mutex);
15 int SimpleMutex_LockMutex(SimpleMutex* simple_mutex); 38 extern SIMPLE_MUTEX_DECLSPEC int SIMPLE_MUTEX_CALL SimpleMutex_LockMutex(SimpleMutex* simple_mutex);
16 void SimpleMutex_UnlockMutex(SimpleMutex* simple_mutex); 39 extern SIMPLE_MUTEX_DECLSPEC void SIMPLE_MUTEX_CALL SimpleMutex_UnlockMutex(SimpleMutex* simple_mutex);
17 40
18 41
19 /* Ends C function definitions when using C++ */ 42 /* Ends C function definitions when using C++ */
20 #ifdef __cplusplus 43 #ifdef __cplusplus
21 } 44 }