| 75 | } |
| 76 | |
| 77 | void tbb_thread_v3::detach() { |
| 78 | if (!joinable()) |
| 79 | handle_perror( EINVAL, "tbb_thread::detach" ); // Invalid argument |
| 80 | #if _WIN32||_WIN64 |
| 81 | BOOL status = CloseHandle( my_handle ); |
| 82 | if ( status == 0 ) |
| 83 | handle_win_error( GetLastError() ); |
| 84 | my_thread_id = 0; |
| 85 | #else |
| 86 | int status = pthread_detach( my_handle ); |
| 87 | if( status ) |
| 88 | handle_perror( status, "pthread_detach" ); |
| 89 | #endif // _WIN32||_WIN64 |
| 90 | my_handle = 0; |
| 91 | } |
| 92 | |
| 93 | void tbb_thread_v3::internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), |
| 94 | void* closure ) { |
no test coverage detected