Get a unique identifier to thread and represent as 64-bit unsigned. * If unsupported, the value 0 is be returned. * Caller should use result only for display/log purposes. */
| 961 | * Caller should use result only for display/log purposes. |
| 962 | */ |
| 963 | static uint64_t hb_thread_to_integer( const hb_thread_t* t ) |
| 964 | { |
| 965 | #if defined( SYS_CYGWIN ) |
| 966 | return (uint64_t)t->thread; |
| 967 | #elif defined( _WIN32 ) || defined( __MINGW32__ ) |
| 968 | # if defined(PTW32_VERSION) |
| 969 | return (uint64_t)(ptrdiff_t)t->thread.p; |
| 970 | # else |
| 971 | return (uint64_t)t->thread; |
| 972 | # endif |
| 973 | #elif defined( SYS_DARWIN ) |
| 974 | return (unsigned long)t->thread; |
| 975 | #else |
| 976 | return (uint64_t)t->thread; |
| 977 | #endif |
| 978 | } |
| 979 | |
| 980 | /************************************************************************ |
| 981 | * hb_thread_func() |
no outgoing calls
no test coverage detected