OLD | NEW |
---|---|
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_IMPL_H_ | 5 #ifndef BASE_SYNCHRONIZATION_LOCK_IMPL_H_ |
6 #define BASE_SYNCHRONIZATION_LOCK_IMPL_H_ | 6 #define BASE_SYNCHRONIZATION_LOCK_IMPL_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 | 41 |
42 // Release the lock. This must only be called by the lock's holder: after | 42 // Release the lock. This must only be called by the lock's holder: after |
43 // a successful call to Try, or a call to Lock. | 43 // a successful call to Try, or a call to Lock. |
44 void Unlock(); | 44 void Unlock(); |
45 | 45 |
46 // Return the native underlying lock. | 46 // Return the native underlying lock. |
47 // TODO(awalker): refactor lock and condition variables so that this is | 47 // TODO(awalker): refactor lock and condition variables so that this is |
48 // unnecessary. | 48 // unnecessary. |
49 NativeHandle* native_handle() { return &native_handle_; } | 49 NativeHandle* native_handle() { return &native_handle_; } |
50 | 50 |
51 #if defined(OS_POSIX) | |
danakj
2016/07/27 22:47:53
ditto
robliao
2016/07/28 20:06:09
See previous comment.
| |
52 // Whether this lock will attempt to use priority inheritance. | |
53 static bool PriorityInheritanceAvailable(); | |
54 #endif | |
55 | |
51 private: | 56 private: |
52 NativeHandle native_handle_; | 57 NativeHandle native_handle_; |
53 | 58 |
54 DISALLOW_COPY_AND_ASSIGN(LockImpl); | 59 DISALLOW_COPY_AND_ASSIGN(LockImpl); |
55 }; | 60 }; |
56 | 61 |
57 } // namespace internal | 62 } // namespace internal |
58 } // namespace base | 63 } // namespace base |
59 | 64 |
60 #endif // BASE_SYNCHRONIZATION_LOCK_IMPL_H_ | 65 #endif // BASE_SYNCHRONIZATION_LOCK_IMPL_H_ |
OLD | NEW |