diff options
-rw-r--r-- | include/osl/doublecheckedlocking.h | 2 |
1 files changed, 2 insertions, 0 deletions
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. |