2014-10-02 22:23 GMT+08:00 Xiangrong Fang <xrf...@gmail.com>:

>
> 2014-10-02 22:09 GMT+08:00 Michael Schnell <mschn...@lumino.de>:
>
>>
>> AFAIR, in Linux, the fpc RTL calls the pthread library "mutex..."
>> function. This library uses Futex, if the arch supports that, and uses the
>> plain old MUTEX system call if the arch does not support FUTEX.
>
>
I found some quotes online:

For Windows, critical sections are lighter-weight than mutexes.
> Mutexes can be shared between processes, but always result in a system
> call to the kernel which has some overhead. Critical sections can only be
> used within one process, but have the advantage that they only switch to
> kernel mode in the case of contention.


I only need lock WITHIN my own application, so, it seems that critical
sections are better.

Xiangrong
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to