On 4 May 2012 15:29, Sean McBride <s...@rogue-research.com> wrote: > Do you necessarily need an integer to display?
I meant integer in the mathematical sense, not the C sense (else I would have used "int"). > You could also print the address of the pthread_t struct Which would be an integer alright, so why not... Not sure if the level of reuse of addresses is the same as the level of reuse of thread IDs though. > or use pthread_getname_np() to get a string name of the thread (though that's > only available on 10.6 and later, and the 'np' means 'not portable'). Wouldn't that mean that OS-X would have different logging from other platforms? The aim is to have something that is similar accross platforms, and we can do that. > libusbx is already calling pthread_setname_np() for the thread it creates. But only for OS X I assume... > It's very rare on Mac OS to drop to mach threads, I'm not sure the > mach_thread_self number is particularly meaningful to anyone doing debugging. That's what WINE does when it needs to obtain a thread ID that is cross-platform (they also have a Solaris implementation). What we do is actually based on what WINE does - the aim was to find out how other mainstream apps solved the problem to avoid bad surprises. Do you anticipate issues from using mach threads? Regards, /Pete ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel