On 2013-02-12 21:54, Martin Schreiber wrote: >> > Where is tthreadid for freebsd defined? I could not find it in rtl.
------------[ rtl/bsd/sysosh.inc ]-------------------- type { fd are int in C also for 64bit targets (x86_64) } THandle = Longint; TThreadRec = record end; TThreadID = ^TThreadRec; { pthread_mutex_t } PRTLCriticalSection = ^TRTLCriticalSection; TRTLCriticalSection = {$i pmutext.inc} ----------------------[ end ]------------------------ Please see the messages I posted in fpc-devel for more details about all the FPC issues with FreeBSD. TThreadID is a pointer to an a opaque type (it can be anything - so no assumptions can be made). So I simply casted GetCurrentThreadID to PtrUInt, so I can treat the pointer value as a "thread id". Many libraries like OpenSSL etc do the same under FreeBSD. You can't actually get a numerical value of a running thread under FreeBSD, but you can name each thread - but that requires a different (FreeBSD specific) API call. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk