[Libreoffice-commits] core.git: include/osl

Chris Sherlock chris.sherlock79 at gmail.com
Fri Mar 17 16:06:54 UTC 2017


 include/osl/doublecheckedlocking.h |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f6e4de5a810aaa6bad75832ff21c2d52611e3543
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Mar 18 03:06:23 2017 +1100

    osl: add code tags to doublecheckedlocking.h
    
    Change-Id: I4218e710a10e5f6f4b44149603beadf3390b6102

diff --git a/include/osl/doublecheckedlocking.h b/include/osl/doublecheckedlocking.h
index 64b07d46cd6c..8e7f4b24e0e8 100644
--- a/include/osl/doublecheckedlocking.h
+++ b/include/osl/doublecheckedlocking.h
@@ -43,6 +43,7 @@ extern "C" {
     compiler errors), though, and you should always call this macro at the
     right places then:
 
+    @code{.cpp}
       static T * pInstance = 0;
 
       T * p = pInstance;
@@ -60,6 +61,7 @@ extern "C" {
       else
           OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
       return p;
+    @endcode
 
     One extra advantage of this macro is that it makes it easier to find all
     places where double-checked locking is used.


More information about the Libreoffice-commits mailing list