mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Move ScopedLock to ripple_basics
This commit is contained in:
@@ -84,6 +84,12 @@ namespace boost {
|
||||
// RippleTime
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
|
||||
// ScopedLock
|
||||
//#include <boost/thread/recursive_mutex.hpp>
|
||||
//#include <boost/shared_ptr.hpp>
|
||||
//#include <boost/make_shared.hpp>
|
||||
//#include <boost/ref.hpp>
|
||||
|
||||
// ByteOrder
|
||||
#ifdef WIN32
|
||||
// (nothing)
|
||||
@@ -122,6 +128,7 @@ namespace boost {
|
||||
#include "utility/ripple_DiffieHellmanUtil.h"
|
||||
#include "utility/ripple_PlatformMacros.h"
|
||||
#include "utility/ripple_RandomNumbers.h"
|
||||
#include "utility/ripple_ScopedLock.h"
|
||||
#include "utility/ripple_StringUtilities.h"
|
||||
#include "utility/ripple_Sustain.h"
|
||||
#include "utility/ripple_ThreadName.h"
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#ifndef __SCOPEDLOCKHOLDER__
|
||||
#define __SCOPEDLOCKHOLDER__
|
||||
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#ifndef RIPPLE_SCOPEDLOCK_H
|
||||
#define RIPPLE_SCOPEDLOCK_H
|
||||
|
||||
typedef boost::recursive_mutex::scoped_lock ScopedLock;
|
||||
|
||||
// A lock holder that can be returned and copied by value
|
||||
// When the last reference goes away, the lock is released
|
||||
|
||||
// VFALCO: TODO, replace these with a more generic template, and not use boost
|
||||
//
|
||||
class SharedScopedLock
|
||||
{
|
||||
protected:
|
||||
@@ -33,6 +30,7 @@ protected:
|
||||
boost::recursive_mutex& mMutex;
|
||||
|
||||
public:
|
||||
// VFALCO: TODO, get rid of this unlock parameter to restore sanity
|
||||
ScopedUnlock(boost::recursive_mutex& mutex, bool unlock = true) : mUnlocked(unlock), mMutex(mutex)
|
||||
{
|
||||
if (unlock)
|
||||
@@ -1239,6 +1239,7 @@
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_Log.h" />
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_PlatformMacros.h" />
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_RandomNumbers.h" />
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_ScopedLock.h" />
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_StringUtilities.h" />
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_Sustain.h" />
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_ThreadName.h" />
|
||||
@@ -1639,7 +1640,6 @@
|
||||
<ClInclude Include="src\cpp\ripple\RPCHandler.h" />
|
||||
<ClInclude Include="src\cpp\ripple\RPCServer.h" />
|
||||
<ClInclude Include="src\cpp\ripple\RPCSub.h" />
|
||||
<ClInclude Include="src\cpp\ripple\ScopedLock.h" />
|
||||
<ClInclude Include="src\cpp\ripple\ScriptData.h" />
|
||||
<ClInclude Include="src\cpp\ripple\SerializedLedger.h" />
|
||||
<ClInclude Include="src\cpp\ripple\SerializedObject.h" />
|
||||
|
||||
@@ -1295,9 +1295,6 @@
|
||||
<ClInclude Include="src\cpp\ripple\SHAMapSync.h">
|
||||
<Filter>1. Modules\ripple_mess\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\ScopedLock.h">
|
||||
<Filter>1. Modules\ripple_mess\types</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\cpp\ripple\Version.h">
|
||||
<Filter>1. Modules\ripple_main\_old</Filter>
|
||||
</ClInclude>
|
||||
@@ -1460,6 +1457,9 @@
|
||||
<ClInclude Include="modules\ripple_data\types\ripple_Serializer.h">
|
||||
<Filter>1. Modules\ripple_data\types</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="modules\ripple_basics\utility\ripple_ScopedLock.h">
|
||||
<Filter>1. Modules\ripple_basics\utility</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="SConstruct" />
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "UniqueNodeList.h"
|
||||
#include "ConnectionPool.h"
|
||||
#include "FeatureTable.h"
|
||||
#include "ScopedLock.h"
|
||||
#include "LedgerAcquire.h"
|
||||
#include "TransactionMaster.h"
|
||||
#include "Wallet.h"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#include "modules/ripple_main/misc/ripple_HashValue.h"
|
||||
|
||||
#include "ScopedLock.h"
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "SerializedTypes.h"
|
||||
#include "Ledger.h"
|
||||
#include "NetworkOPs.h"
|
||||
#include "ScopedLock.h"
|
||||
|
||||
#define LEDGER_CURRENT -1
|
||||
#define LEDGER_CLOSED -2
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include "ScopedLock.h"
|
||||
#include "HashedObject.h"
|
||||
#include "InstanceCounter.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user