[fpc-devel] CSuspendThread/CResumeThread

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Nov 8 11:29:32 CET 2006



On Wed, 8 Nov 2006, Ales Katona wrote:

> A cleaner naming of problematic parts:
> 
> 1. TThreadID is defined stand-alone not as a pthread_t, should be fixed.
> 2. TThreadHandler (the callback for resume, suspend) has result as DWord
> while posix stuff (pthread_kill etc.) usualy return cInt

Just define an opaque type TThreadResult:

 TThreadResult = DWord // Windows

 TThreadResult = cInt  // Unices

> 3. in linux I saw pthreads functions return longint, I think this is
> also investigation worthy.

Yes.

> 
> Question about #1. How should this be handled? Not sure if I can "use"
> unixtypes in sysosh.inc...

You can't. But jonas has a solution.

Michael.



More information about the fpc-devel mailing list