12 recursive_lock_count(0)
26 BOOST_ASSERT(
false &&
"Attempt to free mutex while others are blocking on lock." );
36 context_to_unblock = 0;
38 if( !list_context_iter )
39 return list_context_iter;
42 context_to_unblock = list_context_iter;
45 return list_context_iter;
53 if( context_iter == target )
62 previous = context_iter;
98 return ( get_tail( m_blist, n ) == cc );
108 if( !
lock )
return false;
116 if ( get_tail( m_blist, n ) == cc )
129 e = std::current_exception();
132 cleanup( *
this, m_blist_lock, m_blist, cc);
133 std::rethrow_exception(e);
138 if( !current_context )
146 m_blist = current_context;
147 assert(recursive_lock_count == 0);
148 recursive_lock_count = 1;
155 if ( get_tail( m_blist, dummy_context_to_unblock ) == current_context ) {
156 assert(recursive_lock_count > 0);
157 ++recursive_lock_count;
162 m_blist = current_context;
181 assert(recursive_lock_count == 0);
182 recursive_lock_count = 1;
186 e = std::current_exception();
189 cleanup( *
this, m_blist_lock, m_blist, current_context);
190 std::rethrow_exception(e);
199 assert(recursive_lock_count > 0);
200 --recursive_lock_count;
201 if (recursive_lock_count != 0)
204 get_tail(m_blist, context_to_unblock);
205 if( context_to_unblock )