OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_THREAD_CHECKER_POSIX_H
_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_THREAD_CHECKER_POSIX_H_ |
6 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_THREAD_CHECKER_POSIX_H
_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_THREAD_CHECKER_POSIX_H_ |
7 | 7 |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 | 9 |
10 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h" | 10 #include "mojo/public/cpp/system/macros.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // An implementation of ThreadChecker for POSIX systems. | 15 // An implementation of ThreadChecker for POSIX systems. |
16 class ThreadCheckerPosix { | 16 class ThreadCheckerPosix { |
17 public: | 17 public: |
18 ThreadCheckerPosix(); | 18 ThreadCheckerPosix(); |
19 ~ThreadCheckerPosix(); | 19 ~ThreadCheckerPosix(); |
20 | 20 |
21 bool CalledOnValidThread() const MOJO_WARN_UNUSED_RESULT; | 21 bool CalledOnValidThread() const MOJO_WARN_UNUSED_RESULT; |
22 private: | 22 private: |
23 const pthread_t attached_thread_id_; | 23 const pthread_t attached_thread_id_; |
24 | 24 |
25 MOJO_DISALLOW_COPY_AND_ASSIGN(ThreadCheckerPosix); | 25 MOJO_DISALLOW_COPY_AND_ASSIGN(ThreadCheckerPosix); |
26 }; | 26 }; |
27 | 27 |
28 } // namespace internal | 28 } // namespace internal |
29 } // namespace mojo | 29 } // namespace mojo |
30 | 30 |
31 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_THREAD_CHECKER_POSI
X_H_ | 31 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_THREAD_CHECKER_POSIX_H_ |
OLD | NEW |