Modernizing atomics

Stephan Bergmann sbergman at redhat.com
Tue Oct 27 01:05:25 PDT 2015


On 10/26/2015 06:14 PM, Ashod Nakashian wrote:
> As a transitional phase, we can maintain the same interface but with
> std:atomic as the implementation.

osl/interlck.h is part of the stable URE interface.  While the 
osl_atomic_inc-/decrement macros are marked as INTERNAL and should 
arguably not be called directly by external code, any changes to the 
file would need to be made in a way that it continues to work both as a 
C file and with C++03 compilers.  I would suggest just leaving the file 
alone (unless there is evidence that performance improvement is required 
and possible for some scenario that needs to go through these macros).

However, outside the stable URE interface, there should be no good 
reason not to use C++11 atomics (assuming all relevant compilers support 
them fine by now).


More information about the LibreOffice mailing list