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

Michael Schnell mschnell at lumino.de
Wed Jun 23 14:04:18 CEST 2010


On 06/22/2010 03:12 PM, Henry Vermaak wrote:
>
> No, the syscall api is very stable, so minimum maintenance is
> required.  Which architectures don't provide futex?  I'm not aware of
> any.
>   
The FUTEX Kernel API only makes sense, if the arch provides the
appropriate atomic operations to perform the FUTEX semaphore handling in
user space.

Some archs (like X86 and the new ARMs' "load locked / store conditional"
instructions) provide assembler instructions for this.

Some archs (e.g. older ARMs and BlackFin) provide the "atomic area"
function calls (procedures located at at fixed locations) for this (only
doable with non-SMP implementations).

Some archs don't provide atomic instructions at all (e.g. the current
NIOS arch, "atomic region" is planned to be implemented".) Here enabling
the FUTEX API in the Kernel does not make sense.

-Michael



More information about the fpc-devel mailing list