summaryrefslogtreecommitdiff
path: root/include/osl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-03-18 03:06:23 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2017-03-18 03:06:23 +1100
commitf6e4de5a810aaa6bad75832ff21c2d52611e3543 (patch)
treea8a1d50a94526c32d9dac609bf98546140b28ab0 /include/osl
parentece792ff5716992effdfd9db864d646e7c7ec0a6 (diff)
osl: add code tags to doublecheckedlocking.h
Change-Id: I4218e710a10e5f6f4b44149603beadf3390b6102
Diffstat (limited to 'include/osl')
-rw-r--r--include/osl/doublecheckedlocking.h2
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.