| OLD | NEW |
| 1 /* Copyright (c) 2006, Google Inc. | 1 /* Copyright (c) 2006, Google Inc. |
| 2 * All rights reserved. | 2 * All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #include "base/arm_instruction_set_select.h" | 89 #include "base/arm_instruction_set_select.h" |
| 90 | 90 |
| 91 // TODO(csilvers): match piii, not just __i386. Also, match k8 | 91 // TODO(csilvers): match piii, not just __i386. Also, match k8 |
| 92 #if defined(__MACH__) && defined(__APPLE__) | 92 #if defined(__MACH__) && defined(__APPLE__) |
| 93 #include "base/atomicops-internals-macosx.h" | 93 #include "base/atomicops-internals-macosx.h" |
| 94 #elif defined(__GNUC__) && defined(ARMV6) | 94 #elif defined(__GNUC__) && defined(ARMV6) |
| 95 #include "base/atomicops-internals-arm-v6plus.h" | 95 #include "base/atomicops-internals-arm-v6plus.h" |
| 96 #elif defined(ARMV3) | 96 #elif defined(ARMV3) |
| 97 #include "base/atomicops-internals-arm-generic.h" | 97 #include "base/atomicops-internals-arm-generic.h" |
| 98 #elif defined(_WIN32) | 98 #elif defined(_WIN32) |
| 99 #include "base/atomicops-internals-x86-windows.h" | 99 #include "base/atomicops-internals-windows.h" |
| 100 #elif defined(__GNUC__) && (defined(__i386) || defined(__x86_64__)) | 100 #elif defined(__GNUC__) && (defined(__i386) || defined(__x86_64__)) |
| 101 #include "base/atomicops-internals-x86.h" | 101 #include "base/atomicops-internals-x86.h" |
| 102 #elif defined(__linux__) && defined(__PPC__) | 102 #elif defined(__linux__) && defined(__PPC__) |
| 103 #include "base/atomicops-internals-linuxppc.h" | 103 #include "base/atomicops-internals-linuxppc.h" |
| 104 #else | 104 #else |
| 105 // Assume x86 for now. If you need to support a new architecture and | 105 // Assume x86 for now. If you need to support a new architecture and |
| 106 // don't know how to implement atomic ops, you can probably get away | 106 // don't know how to implement atomic ops, you can probably get away |
| 107 // with using pthreads, since atomicops is only used by spinlock.h/cc | 107 // with using pthreads, since atomicops is only used by spinlock.h/cc |
| 108 //#error You need to implement atomic operations for this architecture | 108 //#error You need to implement atomic operations for this architecture |
| 109 #include "base/atomicops-internals-x86.h" | 109 #include "base/atomicops-internals-x86.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 return base::subtle::Acquire_Load(ptr); | 382 return base::subtle::Acquire_Load(ptr); |
| 383 } | 383 } |
| 384 inline base::subtle::Atomic64 Release_Load( | 384 inline base::subtle::Atomic64 Release_Load( |
| 385 volatile const base::subtle::Atomic64* ptr) { | 385 volatile const base::subtle::Atomic64* ptr) { |
| 386 return base::subtle::Release_Load(ptr); | 386 return base::subtle::Release_Load(ptr); |
| 387 } | 387 } |
| 388 | 388 |
| 389 #endif // BASE_HAS_ATOMIC64 | 389 #endif // BASE_HAS_ATOMIC64 |
| 390 | 390 |
| 391 #endif // THREAD_ATOMICOPS_H_ | 391 #endif // THREAD_ATOMICOPS_H_ |
| OLD | NEW |