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

Henry Vermaak henry.vermaak at gmail.com
Wed Jun 23 15:56:58 CEST 2010


On 23 June 2010 13:58, Michael Schnell <mschnell at lumino.de> wrote:
> On 06/23/2010 02:45 PM, Henry Vermaak wrote:
>> I think you'll first have to worry porting fpc to those architectures.
>>
> Right you are :)
>
> But anyway, if not using libc, you need to do the FUTEX user space part
> in Pascal/Assembler
>
>  - With X86 using the appropriate assembler instructions (such as "lock
> cmpxchg")
>  - with ARM11 using "load locked / store conditional"
>  - with ARM9 using an appropriate call to a fixed Kernel defined address
> to have the atomic instruction executed.
>
> tricky but doable.

We've got this already, then:

http://www.freepascal.org/docs-html/rtl/system/interlockedcompareexchange.html



More information about the fpc-devel mailing list