Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/tbb/compat/thread is written in an unsupported language. File is not indexed.

0001 /*
0002     Copyright (c) 2005-2020 Intel Corporation
0003 
0004     Licensed under the Apache License, Version 2.0 (the "License");
0005     you may not use this file except in compliance with the License.
0006     You may obtain a copy of the License at
0007 
0008         http://www.apache.org/licenses/LICENSE-2.0
0009 
0010     Unless required by applicable law or agreed to in writing, software
0011     distributed under the License is distributed on an "AS IS" BASIS,
0012     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013     See the License for the specific language governing permissions and
0014     limitations under the License.
0015 */
0016 
0017 #include "../internal/_deprecated_header_message_guard.h"
0018 
0019 #if !defined(__TBB_show_deprecation_message_thread_H) && defined(__TBB_show_deprecated_header_message)
0020 #define  __TBB_show_deprecation_message_thread_H
0021 #pragma message("TBB Warning: tbb/compat/thread is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")
0022 #endif
0023 
0024 #if defined(__TBB_show_deprecated_header_message)
0025 #undef __TBB_show_deprecated_header_message
0026 #endif
0027 
0028 #ifndef __TBB_thread_H
0029 #define __TBB_thread_H
0030 
0031 #define __TBB_thread_H_include_area
0032 #include "../internal/_warning_suppress_enable_notice.h"
0033 
0034 #include "../tbb_config.h"
0035 
0036 #if TBB_IMPLEMENT_CPP0X
0037 
0038 #include "../tbb_thread.h"
0039 
0040 namespace std {
0041 
0042 typedef tbb::tbb_thread thread;
0043 
0044 namespace this_thread {
0045     using tbb::this_tbb_thread::get_id;
0046     using tbb::this_tbb_thread::yield;
0047 
0048     __TBB_DEPRECATED_IN_VERBOSE_MODE inline void sleep_for(const tbb::tick_count::interval_t& rel_time) {
0049         tbb::internal::thread_sleep_v3( rel_time );
0050     }
0051 }
0052 
0053 } // namespace std
0054 
0055 #else /* TBB_IMPLEMENT_CPP0X */
0056 
0057 #define __TBB_COMPAT_THREAD_RECURSION_PROTECTOR 1
0058 #include <thread>
0059 #undef __TBB_COMPAT_THREAD_RECURSION_PROTECTOR
0060 
0061 #endif /* TBB_IMPLEMENT_CPP0X */
0062 
0063 #include "../internal/_warning_suppress_disable_notice.h"
0064 #undef __TBB_thread_H_include_area
0065 
0066 #else /* __TBB_thread_H */
0067 
0068 #if __TBB_COMPAT_THREAD_RECURSION_PROTECTOR
0069 #error The tbb/compat/thread header attempts to include itself. \
0070        Please make sure that {TBBROOT}/include/tbb/compat is NOT in include paths.
0071 #endif
0072 
0073 #endif /* __TBB_thread_H */