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

Side by Side Diff: third_party/tcmalloc/chromium/src/base/spinlock_win32-inl.h

Issue 9666033: Experiment for updating the tcmalloc chromium branch to r144 (gperftools 2.0). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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) 2009, Google Inc. 1 /* Copyright (c) 2009, 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 24 matching lines...) Expand all
35 #include <windows.h> 35 #include <windows.h>
36 36
37 namespace base { 37 namespace base {
38 namespace internal { 38 namespace internal {
39 39
40 void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop) { 40 void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop) {
41 if (loop == 0) { 41 if (loop == 0) {
42 } else if (loop == 1) { 42 } else if (loop == 1) {
43 Sleep(0); 43 Sleep(0);
44 } else { 44 } else {
45 // TODO(dmikurube): Re-enable the commented-out code.
46 // We commented out the following line and used the old code "Sleep(1)"
47 // since base/atomicops-internals-windows.h doesn't support 64-bit
48 // operations.
49 //
50 // Commended-out code:
51 // Sleep(base::internal::SuggestedDelayNS(loop) / 1000000);
45 Sleep(1); 52 Sleep(1);
46 } 53 }
47 } 54 }
48 55
49 void SpinLockWake(volatile Atomic32 *w, bool all) { 56 void SpinLockWake(volatile Atomic32 *w, bool all) {
50 } 57 }
51 58
52 } // namespace internal 59 } // namespace internal
53 } // namespace base 60 } // namespace base
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/base/spinlock_posix-inl.h ('k') | third_party/tcmalloc/chromium/src/base/stl_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698