Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Side by Side Diff: third_party/tcmalloc/chromium/src/base/atomicops.h

Issue 7050034: Merge google-perftools r109 (the current contents of third_party/tcmalloc/vendor) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // should define the macro, AtomicWordCastType in a clause similar to the 79 // should define the macro, AtomicWordCastType in a clause similar to the
80 // following: 80 // following:
81 // #if ...pointers are 64 bits... 81 // #if ...pointers are 64 bits...
82 // # define AtomicWordCastType base::subtle::Atomic64 82 // # define AtomicWordCastType base::subtle::Atomic64
83 // #else 83 // #else
84 // # define AtomicWordCastType Atomic32 84 // # define AtomicWordCastType Atomic32
85 // #endif 85 // #endif
86 // TODO(csilvers): figure out ARCH_PIII/ARCH_K8 (perhaps via ./configure?) 86 // TODO(csilvers): figure out ARCH_PIII/ARCH_K8 (perhaps via ./configure?)
87 // ------------------------------------------------------------------------ 87 // ------------------------------------------------------------------------
88 88
89 #include "base/arm_instruction_set_select.h"
90
89 // TODO(csilvers): match piii, not just __i386. Also, match k8 91 // TODO(csilvers): match piii, not just __i386. Also, match k8
90 #if defined(__MACH__) && defined(__APPLE__) 92 #if defined(__MACH__) && defined(__APPLE__)
91 #include "base/atomicops-internals-macosx.h" 93 #include "base/atomicops-internals-macosx.h"
92 #elif defined(_MSC_VER) && defined(_M_IX86) 94 #elif defined(__GNUC__) && defined(ARMV6)
93 #include "base/atomicops-internals-x86-msvc.h" 95 #include "base/atomicops-internals-arm-v6plus.h"
94 #elif defined(__MINGW32__) && defined(__i386__) 96 #elif defined(ARMV3)
95 #include "base/atomicops-internals-x86-msvc.h" 97 #include "base/atomicops-internals-arm-generic.h"
96 #elif defined(__GNUC__) && (defined(__i386) || defined(ARCH_K8)) 98 #elif defined(_WIN32)
99 #include "base/atomicops-internals-windows.h"
100 #elif defined(__GNUC__) && (defined(__i386) || defined(__x86_64__))
97 #include "base/atomicops-internals-x86.h" 101 #include "base/atomicops-internals-x86.h"
98 #elif defined(__linux__) && defined(__PPC__) 102 #elif defined(__linux__) && defined(__PPC__)
99 #include "base/atomicops-internals-linuxppc.h" 103 #include "base/atomicops-internals-linuxppc.h"
100 #else 104 #else
101 // 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
102 // 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
103 // 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
104 //#error You need to implement atomic operations for this architecture 108 //#error You need to implement atomic operations for this architecture
105 #include "base/atomicops-internals-x86.h" 109 #include "base/atomicops-internals-x86.h"
106 #endif 110 #endif
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 return base::subtle::Acquire_Load(ptr); 382 return base::subtle::Acquire_Load(ptr);
379 } 383 }
380 inline base::subtle::Atomic64 Release_Load( 384 inline base::subtle::Atomic64 Release_Load(
381 volatile const base::subtle::Atomic64* ptr) { 385 volatile const base::subtle::Atomic64* ptr) {
382 return base::subtle::Release_Load(ptr); 386 return base::subtle::Release_Load(ptr);
383 } 387 }
384 388
385 #endif // BASE_HAS_ATOMIC64 389 #endif // BASE_HAS_ATOMIC64
386 390
387 #endif // THREAD_ATOMICOPS_H_ 391 #endif // THREAD_ATOMICOPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698