]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/fiber/src/recursive_timed_mutex.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / fiber / src / recursive_timed_mutex.cpp
index f57d286d490ba929e6c21efa7bf314a9b7545f2d..08e48d27119ae0eae4ef1c1b8dc46529c967c45c 100644 (file)
@@ -38,7 +38,6 @@ recursive_timed_mutex::try_lock_until_( std::chrono::steady_clock::time_point co
         }
         BOOST_ASSERT( ! active_ctx->wait_is_linked() );
         active_ctx->wait_link( wait_queue_);
-        intrusive_ptr_add_ref( active_ctx);
         active_ctx->twstatus.store( reinterpret_cast< std::intptr_t >( this), std::memory_order_release);
         // suspend this fiber until notified or timed-out
         if ( ! active_ctx->wait_until( timeout_time, lk) ) {
@@ -106,20 +105,12 @@ recursive_timed_mutex::unlock() {
             wait_queue_.pop_front();
             std::intptr_t expected = reinterpret_cast< std::intptr_t >( this);
             if ( ctx->twstatus.compare_exchange_strong( expected, static_cast< std::intptr_t >( -1), std::memory_order_acq_rel) ) {
-                // notify before timeout
-                intrusive_ptr_release( ctx);
                 // notify context
                 active_ctx->schedule( ctx);
             } else if ( static_cast< std::intptr_t >( 0) == expected) {
                 // no timed-wait op.
                 // notify context
                 active_ctx->schedule( ctx);
-            } else {
-                // timed-wait op.
-                // expected == -1: notify after timeout, same timed-wait op.
-                // expected == <any>: notify after timeout, another timed-wait op. was already started
-                intrusive_ptr_release( ctx);
-                // re-schedule next
             }
         }
     }