From f6e4de5a810aaa6bad75832ff21c2d52611e3543 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sat, 18 Mar 2017 03:06:23 +1100 Subject: osl: add code tags to doublecheckedlocking.h Change-Id: I4218e710a10e5f6f4b44149603beadf3390b6102 --- include/osl/doublecheckedlocking.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osl') 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. -- cgit