On Tue, 22 Jun 2010, Graeme Geldenhuys wrote:

Op 2010-06-22 14:24, Marco van de Voort het geskryf:

No, not straight away. That is technically impossible without integrating a
full C compiler, since POSIX requires to be able to read and interpret


And what if one implements a non-posix based implementation (of Free
Pascal's own design) support for kernel threading? eg: Start with Linux,
then implement others like OSX or *BSD if they support kernel threading. I
did a quick Google search, and there are a lot of multi-threading libraries
which implement kernel or user-space multi-threading which are not based on
POSIX standard.

Here is one such list - there are many more. Not all listed in this link
are POSIX based.

  http://linas.org/linux/threads-faq.html


The WINE project faced a similar problem. How to implement multi-threading
support from Win32 on a Linux kernel that didn't have all the same features
or API.  Read the page linked for more information - it makes for
interesting reading.

 http://www.winehq.org/docs/winedev-guide/threading


Anyway, my first thoughts is the same as Henry's - what would change
between distros?

For the kernel interface: Not so much. (on some archs, FUTEX is missing).

The problem starts if you start linking to C libraries. In that case you're
pretty much forced to use pthreads; each distribution can make different
choices when compiling libc.

It would be nice to have a kernel interface, though. That way you could have
threading support without pulling in libc.

Michael.
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to