annotate Isolated/SimpleMutex.h @ 71:36644b1b940b

Removed use of dllimport for Windows. Johnson Lin reported that he was getting warnings about it. I think the problem is that I didn't handle the case where you compile the files into your project or statically link. In this case you don't want dllexport or dllimport. From what I read, dllimport is optional (an optimization hint). Since this is becoming a nuisance, I rather just remove it rather than require another build flag.
author Eric Wing <ewing . public |-at-| gmail . com>
date Wed, 20 Jun 2012 10:46:03 -0700
parents 208a9ed20087
children 398d1cb12448
rev   line source
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
1 /* Copyright: Eric Wing 2003 */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
2
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
3 #ifndef SIMPLE_MUTEX_H
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
4 #define SIMPLE_MUTEX_H
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
5
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
6 #ifdef __cplusplus
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
7 extern "C" {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
8 #endif
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
9
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
10 #if defined(_WIN32)
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
11 #if defined(SIMPLE_MUTEX_BUILD_LIBRARY)
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
12 #define SIMPLE_MUTEX_DECLSPEC __declspec(dllexport)
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
13 #endif
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
14 #else
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
15 #if defined(SIMPLE_MUTEX_BUILD_LIBRARY)
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
16 #if defined (__GNUC__) && __GNUC__ >= 4
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
17 #define SIMPLE_MUTEX_DECLSPEC __attribute__((visibility("default")))
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
18 #else
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
19 #define SIMPLE_MUTEX_DECLSPEC
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
20 #endif
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
21 #else
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
22 #define SIMPLE_MUTEX_DECLSPEC
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
23 #endif
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
24 #endif
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
25
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
26 #if defined(_WIN32)
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
27 #define SIMPLE_MUTEX_CALL __cdecl
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
28 #else
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
29 #define SIMPLE_MUTEX_CALL
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
30 #endif
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
31
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
32 typedef struct SimpleMutex SimpleMutex;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
33
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
34 extern SIMPLE_MUTEX_DECLSPEC SimpleMutex* SIMPLE_MUTEX_CALL SimpleMutex_CreateMutex(void);
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
35 extern SIMPLE_MUTEX_DECLSPEC void SIMPLE_MUTEX_CALL SimpleMutex_DestroyMutex(SimpleMutex* simple_mutex);
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
36 extern SIMPLE_MUTEX_DECLSPEC int SIMPLE_MUTEX_CALL SimpleMutex_LockMutex(SimpleMutex* simple_mutex);
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.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
37 extern SIMPLE_MUTEX_DECLSPEC void SIMPLE_MUTEX_CALL SimpleMutex_UnlockMutex(SimpleMutex* simple_mutex);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
39
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
40 /* Ends C function definitions when using C++ */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
41 #ifdef __cplusplus
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
42 }
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
43 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
44
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
45 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
46