OLD | NEW |
---|---|
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 Loading... | |
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 latest gperftools here. | |
46 // The update is disabled in Chromium since | |
47 // base/atomicops-internals-windows.h doesn't support 64-bit operations. | |
jar (doing other things)
2012/02/28 22:15:49
Please supply commented out version of original co
Dai Mikurube (NOT FULLTIME)
2012/02/28 23:05:43
Done.
| |
45 Sleep(1); | 48 Sleep(1); |
46 } | 49 } |
47 } | 50 } |
48 | 51 |
49 void SpinLockWake(volatile Atomic32 *w, bool all) { | 52 void SpinLockWake(volatile Atomic32 *w, bool all) { |
50 } | 53 } |
51 | 54 |
52 } // namespace internal | 55 } // namespace internal |
53 } // namespace base | 56 } // namespace base |
OLD | NEW |