[fpc-devel] Threading support and C library under Linux/Unix

Daniël Mantione daniel.mantione at freepascal.org
Wed Jun 23 15:13:43 CEST 2010



Op Wed, 23 Jun 2010, schreef Henry Vermaak:

> A futex syscall doesn't know anything about threads, it's for locking.
> Perhaps I'm misunderstanding you?

I have should have written "futex" instead of "threads". With a Futex, you 
only call the Futex syscall, if the Futex is locked. You still have to 
test wether the Futex is locked in userspace, and you that with the 
interlocked assembler instructions. This assembler implementation must be 
implemented for each architecture (though abstractions can probably be 
used, we already have many interlockedxxxxx procedures).

Daniël


More information about the fpc-devel mailing list