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

Unified Diff: third_party/tcmalloc/chromium/src/base/spinlock_win32-inl.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, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/base/spinlock_win32-inl.h
===================================================================
--- third_party/tcmalloc/chromium/src/base/spinlock_win32-inl.h (revision 87277)
+++ third_party/tcmalloc/chromium/src/base/spinlock_win32-inl.h (working copy)
@@ -28,20 +28,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ---
- * This file is a Win32-specific part of spinlock.cc
+ * This file is a Win32-specific part of spinlock_internal.cc
*/
#include <windows.h>
-static void SpinLockWait(volatile Atomic32 *w) {
- if (base::subtle::NoBarrier_Load(w) != 0) {
+namespace base {
+namespace internal {
+
+void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop) {
+ if (loop == 0) {
+ } else if (loop == 1) {
Sleep(0);
- }
- while (base::subtle::Acquire_CompareAndSwap(w, 0, 1) != 0) {
+ } else {
Sleep(1);
}
}
-static void SpinLockWake(volatile Atomic32 *w) {
+void SpinLockWake(volatile Atomic32 *w, bool all) {
}
+
+} // namespace internal
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698