X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libs%2Fthread%2Fexample%2Frecursive_mutex.cpp;h=a5894832bf6baf6b67f7587f69c8e62d1e48c273;hb=08c1e93fa36a49f49325a07fe91ff92c964c2b6c;hp=c5199545de36b9e9769ea441fc1c93ad235b9235;hpb=bb4dd8289b351fae6b55e303f189127a394a1edd;p=platform%2Fupstream%2Fboost.git diff --git a/libs/thread/example/recursive_mutex.cpp b/libs/thread/example/recursive_mutex.cpp index c519954..a589483 100644 --- a/libs/thread/example/recursive_mutex.cpp +++ b/libs/thread/example/recursive_mutex.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2001-2003 // William E. Kempf // -// Distributed under the Boost Software License, Version 1.0. (See accompanying +// Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include @@ -14,12 +14,12 @@ public: counter() : count(0) { } int add(int val) { - boost::recursive_mutex::scoped_lock scoped_lock(mutex); + boost::unique_lock scoped_lock(mutex); count += val; return count; } int increment() { - boost::recursive_mutex::scoped_lock scoped_lock(mutex); + boost::unique_lock scoped_lock(mutex); return add(1); }