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

[macosx] fix pthread_getschedparam and pthread_setschedparam calls

XMLWordPrintable

    • b02
    • generic
    • os_x

        According to the API documentation, pthread_getschedparam returns an int which is 0 when successful, otherwise it is a value != 0.
        See
        https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/pthread_setschedparam.3.html

        "If successful, these functions return 0. Otherwise, an error number is returned to indicate the error."

        At some places the return code of pthread_getschedparam is checked in the OpenJDK sources, however at os::get_native_priority (os_bsd.cpp) it is not done but should be added.
        Additionally it has been noticed that the usage of pthread_getschedparam and pthread_setschedparam in os_bsd.cpp functions os::set_native_priority / os::get_native_priority is not correct, because the wrong pthread id is passed to the calls.

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: