MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / lock_helper

Function lock_helper

extern/boost/boost/thread/lock_algorithms.hpp:88–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87 template <typename MutexType1, typename MutexType2>
88 unsigned lock_helper(MutexType1& m1, MutexType2& m2)
89 {
90 boost::unique_lock<MutexType1> l1(m1);
91 if (!m2.try_lock())
92 {
93 return 1;
94 }
95 l1.release();
96 return 0;
97 }
98
99 template <typename MutexType1, typename MutexType2, typename MutexType3>
100 unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3)

Callers 2

lock_implFunction · 0.85
lockFunction · 0.85

Calls 3

try_lock_internalFunction · 0.85
try_lockMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected