| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 NET_QUIC_PLATFORM_API_QUIC_MUTEX_H_ | 5 #ifndef NET_QUIC_PLATFORM_API_QUIC_MUTEX_H_ |
| 6 #define NET_QUIC_PLATFORM_API_QUIC_MUTEX_H_ | 6 #define NET_QUIC_PLATFORM_API_QUIC_MUTEX_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "net/quic/platform/impl/quic_mutex_impl.h" | 9 #include "net/quic/platform/impl/quic_mutex_impl.h" |
| 9 | 10 |
| 10 namespace net { | 11 namespace net { |
| 11 | 12 |
| 12 // A class representing a non-reentrant mutex in QUIC. | 13 // A class representing a non-reentrant mutex in QUIC. |
| 13 class QUIC_EXPORT_PRIVATE LOCKABLE QuicMutex { | 14 class QUIC_EXPORT_PRIVATE LOCKABLE QuicMutex { |
| 14 public: | 15 public: |
| 15 QuicMutex() = default; | 16 QuicMutex() = default; |
| 16 | 17 |
| 17 // Block until this Mutex is free, then acquire it exclusively. | 18 // Block until this Mutex is free, then acquire it exclusively. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 QuicMutex* const lock_; | 64 QuicMutex* const lock_; |
| 64 | 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(QuicWriterMutexLock); | 66 DISALLOW_COPY_AND_ASSIGN(QuicWriterMutexLock); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace net | 69 } // namespace net |
| 69 | 70 |
| 70 #endif // NET_QUIC_PLATFORM_API_QUIC_MUTEX_H_ | 71 #endif // NET_QUIC_PLATFORM_API_QUIC_MUTEX_H_ |
| OLD | NEW |