Skip to content
  • Darren Hart's avatar
    futex: remove FUTEX_REQUEUE_PI (non CMP) · ba9c22f2
    Darren Hart authored
    The new requeue PI futex op codes were modeled after the existing
    FUTEX_REQUEUE and FUTEX_CMP_REQUEUE calls.  I was unaware at the time
    that FUTEX_REQUEUE was only around for compatibility reasons and
    shouldn't be used in new code.  Ulrich Drepper elaborates on this in his
    Futexes are Tricky paper: http://people.redhat.com/drepper/futex.pdf
    
    .
    The deprecated call doesn't catch changes to the futex corresponding to
    the destination futex which can lead to deadlock.
    
    Therefor, I feel it best to remove FUTEX_REQUEUE_PI and leave only
    FUTEX_CMP_REQUEUE_PI as there are not yet any existing users of the API.
    This patch does change the OP code value of FUTEX_CMP_REQUEUE_PI to 12
    from 13.  Since my test case is the only known user of this API, I felt
    this was the right thing to do, rather than leave a hole in the
    enumeration.
    
    I chose to continue using the _CMP_ modifier in the OP code to make it
    explicit to the user that the test is being done.
    
    Builds, boots, and ran several hundred iterations requeue_pi.c.
    
    Signed-off-by: default avatarDarren Hart <dvhltc@us.ibm.com>
    LKML-Reference: <49ED580E.1050502@us.ibm.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    ba9c22f2