[fpc-devel] Threads and alot of crap
Daniël Mantione
daniel.mantione at freepascal.org
Mon Oct 16 22:49:29 CEST 2006
Op Mon, 16 Oct 2006, schreef Ales Katona:
> On po , 2006-10-16 at 22:21 +0200, Daniël Mantione wrote:
> >
> > Op Mon, 16 Oct 2006, schreef Ales Katona:>
> > > Write your ideas on the subject please.
> >
> > Short answer: Kick pthreads and use kernel threads.
>
> That's a nice idea but there are a few problems.
>
> Kernel threads for example in freeBSD require a "scheduler" in userlevel
> along with other userlevel stuff which is normaly implemented by one of
> the pthreads libs. This means we'd have to implement a full blown
> threading lib.
A scheduler is normally for userspace threads? I thought FreeBSD finally
had kernel threads with 5.0?
> I already added kse_ syscalls in freeBSD, if we want to go this route,
> these can be used to add proper SMP support to our threads, but I think
> using pthreads would be more sane.
I don't. Tthread doesn't fit well on the Posix thread model. At least for
Linux, the kernel does not expose Posix threads, those are already
emulated over the Linux thread model. In other works, pthreads results
in subpar performance, and an emulation on top of emulation doesn't sound
so good for robustness either.
Daniël
More information about the fpc-devel
mailing list