Kaydet (Commit) f6e4de5a authored tarafından Chris Sherlock's avatar Chris Sherlock

osl: add code tags to doublecheckedlocking.h

Change-Id: I4218e710a10e5f6f4b44149603beadf3390b6102
üst ece792ff
...@@ -43,6 +43,7 @@ extern "C" { ...@@ -43,6 +43,7 @@ extern "C" {
compiler errors), though, and you should always call this macro at the compiler errors), though, and you should always call this macro at the
right places then: right places then:
@code{.cpp}
static T * pInstance = 0; static T * pInstance = 0;
T * p = pInstance; T * p = pInstance;
...@@ -60,6 +61,7 @@ extern "C" { ...@@ -60,6 +61,7 @@ extern "C" {
else else
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
return p; return p;
@endcode
One extra advantage of this macro is that it makes it easier to find all One extra advantage of this macro is that it makes it easier to find all
places where double-checked locking is used. places where double-checked locking is used.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment