On OSX, a pthread_t is used as the native thread id in an OSThread. pthread_t
is a 8-byte value rather a 4-byte value as it is on the other supported platforms.
Java Flight Recorder currently relies on the thread id being 4 rather than 8 bytes,
and it would require a file format change to switch. The thread id is an identifier
and doesn't appear to be used for anything else on OSX.
Rather than change file formats, it might be possible to instead use a mach_port_t,
which is an unsigned int (and thus 4 bytes). To get it, use
mach_port_t tid = pthread_mach_thread_np(pthread_self());