| tbb_config.h | | tbb_config.h | |
| | | | |
| skipping to change at line 425 | | skipping to change at line 425 | |
| #define __TBB_CPP11_STD_FORWARD_BROKEN 1 | | #define __TBB_CPP11_STD_FORWARD_BROKEN 1 | |
| #else | | #else | |
| #define __TBB_CPP11_STD_FORWARD_BROKEN 0 | | #define __TBB_CPP11_STD_FORWARD_BROKEN 0 | |
| #endif | | #endif | |
| | | | |
| #if __TBB_DEFINE_MIC | | #if __TBB_DEFINE_MIC | |
| /** Main thread and user's thread have different default thread affinit
y masks. **/ | | /** Main thread and user's thread have different default thread affinit
y masks. **/ | |
| #define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1 | | #define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1 | |
| #endif | | #endif | |
| | | | |
|
| | | /** __TBB_WIN8UI_SUPPORT enables support of New Windows*8 Store Apps and li | |
| | | mit a possibility to load | |
| | | shared libraries at run time only from application container **/ | |
| #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP | | #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP | |
|
| #define __TBB_WIN8UI_SUPPORT 1 | | #define __TBB_WIN8UI_SUPPORT 1 | |
| #else | | #else | |
|
| #define __TBB_WIN8UI_SUPPORT 0 | | #define __TBB_WIN8UI_SUPPORT 0 | |
| #endif | | #endif | |
| | | | |
| #if !defined(__EXCEPTIONS) && __GNUC__==4 && (__GNUC_MINOR__==4 ||__GNUC_MI
NOR__==5 || (__INTEL_COMPILER==1300 && __TBB_GCC_VERSION>=40600 && __TBB_GC
C_VERSION<=40700)) && defined(__GXX_EXPERIMENTAL_CXX0X__) | | #if !defined(__EXCEPTIONS) && __GNUC__==4 && (__GNUC_MINOR__==4 ||__GNUC_MI
NOR__==5 || (__INTEL_COMPILER==1300 && __TBB_GCC_VERSION>=40600 && __TBB_GC
C_VERSION<=40700)) && defined(__GXX_EXPERIMENTAL_CXX0X__) | |
| /* There is an issue for specific GCC toolchain when C++11 is enabled | | /* There is an issue for specific GCC toolchain when C++11 is enabled | |
| and exceptions are disabled: | | and exceptions are disabled: | |
| exceprion_ptr.h/nested_exception.h are using throw unconditionally. | | exceprion_ptr.h/nested_exception.h are using throw unconditionally. | |
| */ | | */ | |
| #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1 | | #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1 | |
| #else | | #else | |
| #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 0 | | #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 0 | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|
| tbb_thread.h | | tbb_thread.h | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| this file and link it with other files to produce an executable, this | | this file and link it with other files to produce an executable, this | |
| file does not by itself cause the resulting executable to be covered by | | file does not by itself cause the resulting executable to be covered by | |
| the GNU General Public License. This exception does not however | | the GNU General Public License. This exception does not however | |
| invalidate any other reasons why the executable file might be covered b
y | | invalidate any other reasons why the executable file might be covered b
y | |
| the GNU General Public License. | | the GNU General Public License. | |
| */ | | */ | |
| | | | |
| #ifndef __TBB_tbb_thread_H | | #ifndef __TBB_tbb_thread_H | |
| #define __TBB_tbb_thread_H | | #define __TBB_tbb_thread_H | |
| | | | |
|
| | | #include "tbb_stddef.h" | |
| #if _WIN32||_WIN64 | | #if _WIN32||_WIN64 | |
| #include "machine/windows_api.h" | | #include "machine/windows_api.h" | |
| #define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI | | #define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI | |
| #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* ) | | #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* ) | |
|
| | | #if __TBB_WIN8UI_SUPPORT | |
| | | typedef size_t thread_id_type; | |
| | | #else // __TBB_WIN8UI_SUPPORT | |
| | | typedef DWORD thread_id_type; | |
| | | #endif // __TBB_WIN8UI_SUPPORT | |
| #else | | #else | |
| #define __TBB_NATIVE_THREAD_ROUTINE void* | | #define __TBB_NATIVE_THREAD_ROUTINE void* | |
| #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* ) | | #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* ) | |
| #include <pthread.h> | | #include <pthread.h> | |
| #endif // _WIN32||_WIN64 | | #endif // _WIN32||_WIN64 | |
| | | | |
|
| #include "tbb_stddef.h" | | | |
| #include "tick_count.h" | | #include "tick_count.h" | |
| | | | |
| #if !TBB_USE_EXCEPTIONS && _MSC_VER | | #if !TBB_USE_EXCEPTIONS && _MSC_VER | |
| // Suppress "C++ exception handler used, but unwind semantics are not e
nabled" warning in STL headers | | // Suppress "C++ exception handler used, but unwind semantics are not e
nabled" warning in STL headers | |
| #pragma warning (push) | | #pragma warning (push) | |
| #pragma warning (disable: 4530) | | #pragma warning (disable: 4530) | |
| #endif | | #endif | |
| | | | |
| #include <iosfwd> | | #include <iosfwd> | |
| | | | |
| | | | |
| skipping to change at line 186 | | skipping to change at line 191 | |
| with its affinity mask. | | with its affinity mask. | |
| | | | |
| NOTE: The return value of this method never changes after its f
irst | | NOTE: The return value of this method never changes after its f
irst | |
| invocation. This means that changes in the process affinity mas
k that | | invocation. This means that changes in the process affinity mas
k that | |
| took place after this method was first invoked will not affect
the | | took place after this method was first invoked will not affect
the | |
| number of worker threads in the TBB worker threads pool. **/ | | number of worker threads in the TBB worker threads pool. **/ | |
| static unsigned __TBB_EXPORTED_FUNC hardware_concurrency(); | | static unsigned __TBB_EXPORTED_FUNC hardware_concurrency(); | |
| private: | | private: | |
| native_handle_type my_handle; | | native_handle_type my_handle; | |
| #if _WIN32||_WIN64 | | #if _WIN32||_WIN64 | |
|
| DWORD my_thread_id; | | thread_id_type my_thread_id; | |
| #endif // _WIN32||_WIN64 | | #endif // _WIN32||_WIN64 | |
| | | | |
| /** Runs start_routine(closure) on another thread and sets my_handl
e to the handle of the created thread. */ | | /** Runs start_routine(closure) on another thread and sets my_handl
e to the handle of the created thread. */ | |
| void __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUT
INE_PTR(start_routine), | | void __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUT
INE_PTR(start_routine), | |
| void* closure ); | | void* closure ); | |
| friend void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thr
ead_v3& t2 ); | | friend void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thr
ead_v3& t2 ); | |
| friend void tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ); | | friend void tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ); | |
| }; | | }; | |
| | | | |
| class tbb_thread_v3::id { | | class tbb_thread_v3::id { | |
| #if _WIN32||_WIN64 | | #if _WIN32||_WIN64 | |
|
| DWORD my_id; | | thread_id_type my_id; | |
| id( DWORD id_ ) : my_id(id_) {} | | id( thread_id_type id_ ) : my_id(id_) {} | |
| #else | | #else | |
| pthread_t my_id; | | pthread_t my_id; | |
| id( pthread_t id_ ) : my_id(id_) {} | | id( pthread_t id_ ) : my_id(id_) {} | |
| #endif // _WIN32||_WIN64 | | #endif // _WIN32||_WIN64 | |
| friend class tbb_thread_v3; | | friend class tbb_thread_v3; | |
| public: | | public: | |
| id() : my_id(0) {} | | id() : my_id(0) {} | |
| | | | |
| friend bool operator==( tbb_thread_v3::id x, tbb_thread_v3::id y ); | | friend bool operator==( tbb_thread_v3::id x, tbb_thread_v3::id y ); | |
| friend bool operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y ); | | friend bool operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y ); | |
| | | | |
| skipping to change at line 284 | | skipping to change at line 289 | |
| | | | |
| inline void move( tbb_thread& t1, tbb_thread& t2 ) { | | inline void move( tbb_thread& t1, tbb_thread& t2 ) { | |
| internal::move_v3(t1, t2); | | internal::move_v3(t1, t2); | |
| } | | } | |
| | | | |
| inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2
) { | | inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2
) { | |
| tbb::tbb_thread::native_handle_type h = t1.my_handle; | | tbb::tbb_thread::native_handle_type h = t1.my_handle; | |
| t1.my_handle = t2.my_handle; | | t1.my_handle = t2.my_handle; | |
| t2.my_handle = h; | | t2.my_handle = h; | |
| #if _WIN32||_WIN64 | | #if _WIN32||_WIN64 | |
|
| DWORD i = t1.my_thread_id; | | thread_id_type i = t1.my_thread_id; | |
| t1.my_thread_id = t2.my_thread_id; | | t1.my_thread_id = t2.my_thread_id; | |
| t2.my_thread_id = i; | | t2.my_thread_id = i; | |
| #endif /* _WIN32||_WIN64 */ | | #endif /* _WIN32||_WIN64 */ | |
| } | | } | |
| | | | |
| namespace this_tbb_thread { | | namespace this_tbb_thread { | |
| inline tbb_thread::id get_id() { return internal::thread_get_id_v3(); } | | inline tbb_thread::id get_id() { return internal::thread_get_id_v3(); } | |
| //! Offers the operating system the opportunity to schedule another thr
ead. | | //! Offers the operating system the opportunity to schedule another thr
ead. | |
| inline void yield() { internal::thread_yield_v3(); } | | inline void yield() { internal::thread_yield_v3(); } | |
| //! The current thread blocks at least until the time specified. | | //! The current thread blocks at least until the time specified. | |
| inline void sleep(const tick_count::interval_t &i) { | | inline void sleep(const tick_count::interval_t &i) { | |
| internal::thread_sleep_v3(i); | | internal::thread_sleep_v3(i); | |
| | | | |
End of changes. 6 change blocks. |
| 7 lines changed or deleted | | 12 lines changed or added | |
|