pthread_getschedparam() returns zero after completing successfully. Any other return value indicates that an error occurred. When the following condition occurs, the function fails and returns the corresponding value.
ESRCH
Description:The value specified by tid does not refer to an existing thread.