fix pthread_create return value with PTHREAD_EXPLICIT_SCHED
due to moved code, commit b8742f32 inadvertently used the return value of __clone, rather than the return value of SYS_sched_setscheduler in the new thread, to check whether it needed to report failure. since a successful __clone returns the tid of the new thread, which is never zero, this caused pthread_create always to return with an invalid error number in the code path for PTHREAD_EXPLICIT_SCHED. this regression was not present in any releases.
Showing
想要评论请 注册 或 登录