1 | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved. |
2 | |
3 | Licensed under the Apache License, Version 2.0 (the "License"); |
4 | you may not use this file except in compliance with the License. |
5 | You may obtain a copy of the License at |
6 | |
7 | http://www.apache.org/licenses/LICENSE-2.0 |
8 | |
9 | Unless required by applicable law or agreed to in writing, software |
10 | distributed under the License is distributed on an "AS IS" BASIS, |
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | See the License for the specific language governing permissions and |
13 | limitations under the License. |
14 | ==============================================================================*/ |
15 | |
16 | // This header file contains the macro definitions for thread safety |
17 | // annotations that allow the developers to document the locking policies |
18 | // of their multi-threaded code. The annotations can also help program |
19 | // analysis tools to identify potential thread safety issues. |
20 | // |
21 | // The primary documentation on these annotations is external: |
22 | // http://clang.llvm.org/docs/ThreadSafetyAnalysis.html |
23 | // |
24 | // The annotations are implemented using compiler attributes. |
25 | // Using the macros defined here instead of the raw attributes allows |
26 | // for portability and future compatibility. |
27 | // |
28 | // When referring to mutexes in the arguments of the attributes, you should |
29 | // use variable names or more complex expressions (e.g. my_object->mutex_) |
30 | // that evaluate to a concrete mutex object whenever possible. If the mutex |
31 | // you want to refer to is not in scope, you may use a member pointer |
32 | // (e.g. &MyClass::mutex_) to refer to a mutex in some (unknown) object. |
33 | // |
34 | |
35 | #ifndef TENSORFLOW_CORE_PLATFORM_THREAD_ANNOTATIONS_H_ |
36 | #define TENSORFLOW_CORE_PLATFORM_THREAD_ANNOTATIONS_H_ |
37 | |
38 | // IWYU pragma: private, include "third_party/tensorflow/core/platform/thread_annotations.h" |
39 | // IWYU pragma: friend third_party/tensorflow/core/platform/thread_annotations.h |
40 | |
41 | #include "tensorflow/tsl/platform/thread_annotations.h" |
42 | |
43 | #endif // TENSORFLOW_CORE_PLATFORM_THREAD_ANNOTATIONS_H_ |
44 | |