+/* 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.
+ */
+static uint64_t hb_thread_to_integer( const hb_thread_t* t )
+{
+#if defined( USE_PTHREAD )
+ #if defined( SYS_CYGWIN )
+ return (uint64_t)t->thread;
+ #elif defined( _WIN32 ) || defined( __MINGW32__ )
+ return (uint64_t)(ptrdiff_t)t->thread.p;
+ #elif defined( SYS_DARWIN )
+ return (unsigned long)t->thread;
+ #else
+ return (uint64_t)t->thread;
+ #endif
+#else
+ return 0;
+#endif
+}
+