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

Side by Side Diff: base/synchronization/lock.h

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « base/synchronization/condition_variable_win.cc ('k') | base/synchronization/lock_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_SYNCHRONIZATION_LOCK_H_ 5 #ifndef BASE_SYNCHRONIZATION_LOCK_H_
6 #define BASE_SYNCHRONIZATION_LOCK_H_ 6 #define BASE_SYNCHRONIZATION_LOCK_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/synchronization/lock_impl.h" 9 #include "base/synchronization/lock_impl.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 void AssertAcquired() const; 58 void AssertAcquired() const;
59 #endif // NDEBUG && !DCHECK_ALWAYS_ON 59 #endif // NDEBUG && !DCHECK_ALWAYS_ON
60 60
61 #if defined(OS_POSIX) 61 #if defined(OS_POSIX)
62 // The posix implementation of ConditionVariable needs to be able 62 // The posix implementation of ConditionVariable needs to be able
63 // to see our lock and tweak our debugging counters, as it releases 63 // to see our lock and tweak our debugging counters, as it releases
64 // and acquires locks inside of pthread_cond_{timed,}wait. 64 // and acquires locks inside of pthread_cond_{timed,}wait.
65 friend class ConditionVariable; 65 friend class ConditionVariable;
66 #elif defined(OS_WIN)
67 // The Windows Vista implementation of ConditionVariable needs the
68 // native handle of the critical section.
69 friend class WinVistaCondVar;
70 #endif 66 #endif
71 67
72 private: 68 private:
73 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) 69 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
74 // Members and routines taking care of locks assertions. 70 // Members and routines taking care of locks assertions.
75 // Note that this checks for recursive locks and allows them 71 // Note that this checks for recursive locks and allows them
76 // if the variable is set. This is allowed by the underlying implementation 72 // if the variable is set. This is allowed by the underlying implementation
77 // on windows but not on Posix, so we're doing unneeded checks on Posix. 73 // on windows but not on Posix, so we're doing unneeded checks on Posix.
78 // It's worth it to share the code. 74 // It's worth it to share the code.
79 void CheckHeldAndUnmark(); 75 void CheckHeldAndUnmark();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 124 }
129 125
130 private: 126 private:
131 Lock& lock_; 127 Lock& lock_;
132 DISALLOW_COPY_AND_ASSIGN(AutoUnlock); 128 DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
133 }; 129 };
134 130
135 } // namespace base 131 } // namespace base
136 132
137 #endif // BASE_SYNCHRONIZATION_LOCK_H_ 133 #endif // BASE_SYNCHRONIZATION_LOCK_H_
OLDNEW
« no previous file with comments | « base/synchronization/condition_variable_win.cc ('k') | base/synchronization/lock_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698