OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* | 7 /* |
8 * NaCl Server Runtime mutex and condition variable abstraction layer. | 8 * NaCl Server Runtime mutex and condition variable abstraction layer. |
9 * This is the host-OS-independent interface. | 9 * This is the host-OS-independent interface. |
10 */ | 10 */ |
11 #ifndef NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ | 11 #ifndef NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ |
12 #define NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ | 12 #define NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ |
13 | 13 |
| 14 #include "native_client/src/include/nacl_defines.h" |
14 #if defined(__native_client__) || NACL_LINUX || NACL_OSX | 15 #if defined(__native_client__) || NACL_LINUX || NACL_OSX |
15 # include <pthread.h> | 16 # include <pthread.h> |
16 # include "native_client/src/shared/platform/posix/nacl_fast_mutex.h" | 17 # include "native_client/src/shared/platform/posix/nacl_fast_mutex.h" |
17 #elif NACL_WINDOWS | 18 #elif NACL_WINDOWS |
18 # include "native_client/src/shared/platform/win/nacl_fast_mutex.h" | 19 # include "native_client/src/shared/platform/win/nacl_fast_mutex.h" |
19 #else | 20 #else |
20 # error "What OS?" | 21 # error "What OS?" |
21 #endif | 22 #endif |
22 #include "native_client/src/include/nacl_compiler_annotations.h" | 23 #include "native_client/src/include/nacl_compiler_annotations.h" |
23 #include "native_client/src/include/nacl_base.h" | 24 #include "native_client/src/include/nacl_base.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void NaClFastMutexLock(struct NaClFastMutex *flp); | 158 void NaClFastMutexLock(struct NaClFastMutex *flp); |
158 | 159 |
159 int NaClFastMutexTryLock(struct NaClFastMutex *flp) NACL_WUR; | 160 int NaClFastMutexTryLock(struct NaClFastMutex *flp) NACL_WUR; |
160 | 161 |
161 void NaClFastMutexUnlock(struct NaClFastMutex *flp); | 162 void NaClFastMutexUnlock(struct NaClFastMutex *flp); |
162 | 163 |
163 EXTERN_C_END | 164 EXTERN_C_END |
164 | 165 |
165 | 166 |
166 #endif /* NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ */ | 167 #endif /* NATIVE_CLIENT_SRC_SHARED_PLATFORM_NACL_SYNC_H_ */ |
OLD | NEW |