> 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
version?

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
later)

> 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
ctypes).

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

If so, then it should it should

 second
> 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;

Interface

{$i ptypes.inc}

Implementation

End.

And this situation is by design.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to