Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214144

Remove confusing locking_enqueue_completed_buffer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • None
    • hotspot
    • gc
    • b21
    • generic
    • generic

      PtrQueue::locking_enqueue_completed_buffer asserts _lock->owned_by_self() and then calls enqueue_complete_buffer. It used to contain a complicated unlock / with-other-lock / relock pattern, but was simplified as part of JDK-8182703.

      It is called from exactly one place, in PtrQueue::handle_zero_index, a few lines after an assert of _lock->owned_by_self().

      At this point, it just adds a function call and makes the code a bit harder to understand because of the confusing name. So remove it and just call enqueue_complete_buffer directly instead.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: