| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008, Google Inc. | 2 * Copyright 2008, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #ifdef __native_client__ | 44 #ifdef __native_client__ |
| 45 #include "native_client/src/include/nacl/atomic_ops.h" | 45 #include "native_client/src/include/nacl/atomic_ops.h" |
| 46 #elif NACL_OSX | 46 #elif NACL_OSX |
| 47 #include "native_client/src/include/osx/atomic_ops_osx.h" | 47 #include "native_client/src/include/osx/atomic_ops_osx.h" |
| 48 #elif NACL_LINUX | 48 #elif NACL_LINUX |
| 49 | 49 |
| 50 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 | 50 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 |
| 51 #include "native_client/src/include/linux/x86/atomic_ops.h" | 51 #include "native_client/src/include/linux/x86/atomic_ops.h" |
| 52 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm | 52 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm |
| 53 #include "native_client/src/include/linux/arm/atomic_ops.h" | 53 #include "native_client/src/include/linux/arm/atomic_ops.h" |
| 54 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips |
| 55 #include "native_client/src/include/linux/mips/atomic_ops.h" |
| 54 #else | 56 #else |
| 55 #error Unknown platform! | 57 #error Unknown platform! |
| 56 #endif | 58 #endif |
| 57 | 59 |
| 58 #elif NACL_WINDOWS | 60 #elif NACL_WINDOWS |
| 59 #include "native_client/src/include/win/atomic_ops_win32.h" | 61 #include "native_client/src/include/win/atomic_ops_win32.h" |
| 60 #else | 62 #else |
| 61 #error You need to implement atomic operations for this architecture | 63 #error You need to implement atomic operations for this architecture |
| 62 #endif | 64 #endif |
| 63 | 65 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 100 |
| 99 | 101 |
| 100 /* Atomically increment *ptr by "increment". Returns the new value of | 102 /* Atomically increment *ptr by "increment". Returns the new value of |
| 101 * *ptr with the increment applied. This routine implies no memory | 103 * *ptr with the increment applied. This routine implies no memory |
| 102 * barriers. | 104 * barriers. |
| 103 */ | 105 */ |
| 104 static INLINE Atomic32 | 106 static INLINE Atomic32 |
| 105 AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment); | 107 AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment); |
| 106 | 108 |
| 107 #endif /* NATIVE_CLIENT_SRC_INCLUDE_ATOMIC_OPS_H_ */ | 109 #endif /* NATIVE_CLIENT_SRC_INCLUDE_ATOMIC_OPS_H_ */ |
| OLD | NEW |