[fpc-devel] CSuspendThread/CResumeThread

Marco van de Voort marcov at stack.nl
Wed Nov 8 10:58:30 CET 2006

> Note:
> unixtypes thread_t = pointer

Wrong, same as in ptypes.inc

> pthreads.inc thread_t (BSD and linux) = cInt {linux is Longint but
> that's just bug)

freebsd/pthreads.inc doesn't define thread_t, neither does the linux

There is a small issue with tthreadid which is already used to avoid this
problem (typing of threadids) in cthreads. This is now defined in sysos, and
could be made to match thread_t (which probably only got to ptypes.inc

> This is some serious mess. 

I don't see the exact problem. Sure ctypes needs some workaround for this,
but just extending the current one. (see typecasting to tthreadid already in

> First the threadmanager functions need to return a signed result,

If so, then it should it should

> the pointer vs cInt stuff has to be properly cleaned, remove thread_t from
> unittypes etc.

This is not possible. There should be none there:

unit unixtype;


{$i ptypes.inc}



And this situation is by design.

More information about the fpc-devel mailing list