Ticket #4164: fix_delay.patch

File fix_delay.patch, 1.2 KB (added by eran <eran@…>, 12 years ago)
  • message_queue.hpp

     
    491491      //Copy user buffer to the message
    492492      std::memcpy(free_msg->data(), buffer, buffer_size);
    493493
    494 //      bool was_empty = p_hdr->is_empty();
     494      bool was_empty = p_hdr->is_empty();
    495495      //Insert the first free message in the priority queue
    496496      p_hdr->queue_free_msg();
    497497     
    498498      //If this message changes the queue empty state, notify it to receivers
    499 //      if (was_empty){
     499      if (was_empty){
    500500         p_hdr->m_cond_recv.notify_one();
    501 //      }
     501      }
    502502   }  // Lock end
    503503
    504504   return true;
     
    587587      //Copy data to receiver's bufers
    588588      std::memcpy(buffer, top_msg->data(), recvd_size);
    589589
    590 //      bool was_full = p_hdr->is_full();
     590      bool was_full = p_hdr->is_full();
    591591
    592592      //Free top message and put it in the free message list
    593593      p_hdr->free_top_msg();
    594594
    595595      //If this reception changes the queue full state, notify senders
    596 //      if (was_full){
     596      if (was_full){
    597597         p_hdr->m_cond_send.notify_one();
    598 //      }
     598      }
    599599   }  //Lock end
    600600
    601601   return true;