-
Bug
-
Resolution: Fixed
-
P4
-
13
-
b02
-
generic
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8221391 | 11.0.4 | Matthias Baesken | P4 | Resolved | Fixed | b01 |
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.
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.
- backported by
-
JDK-8221391 [macosx] fix pthread_getschedparam and pthread_setschedparam calls
- Resolved