[fpc-devel] Threads and alot of crap

Ales Katona almindor at gmail.com
Mon Oct 16 22:12:33 CEST 2006


I've implemented the semaphores stuff (with a big bad bug, btw thanks
Jonas for fixing).

Right now I'm thinking about how to go next.

The choices I see right now are:

1. Basicly just clean the current pthreads implementation, make sure
types are not redefined in baseunix/unixtypes and pthreads etc. and be
happy.

2. Add proper "interface" style pthreads with chosable (how is a
question) backend lib (eg: freeBSD has 3 libs to which a pthread
interface can link).

There's also a choice #3 which is a complete threading design overhaul,
but since that'd break old code I don't even consider it to be an option
(I actualy do but I know you wouldn't).

There's also still the hackish NPTL vs processes linux situation in
TThread 2.4 vs 2.6 kernel. Not sure if it's considered "clean enough"
now that pipes are gone or if that should be somehow addressed as well.

If the linux tthread.inc could be cleaned, I'm 100% sure that
tthread.inc could be merged into one file and put into rtl/unix.

Write your ideas on the subject please.

Ales




More information about the fpc-devel mailing list