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" {
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.
......
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