On 2012.05.03 23:27, Sean McBride wrote: > On Thu, 3 May 2012 23:20:09 +0100, Pete Batard said: > >> +#elif defined(__APPLE__) >> + ret = mach_thread_self(); >> + mach_port_deallocate(mach_task_self(), ret); > > Perhaps I missed an earlier discussion, but why drop to the mach level? > Wouldn't pthread_self() be more portable?
The problem with pthread_self() is it returns a pthread_t, which, from what I could see, is not guaranteed to be an integer (can be an opaque struct [1]). Since we want to display it, we need an integer value. Regards, /Pete [1] http://stackoverflow.com/questions/1759794/how-to-print-pthread-t ------------------------------------------------------------------------------ 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