status_t _get_thread_info(thread_id thread, thread_info *info, size_t size) { if (info == NULL || size != sizeof(thread_info)) return B_BAD_VALUE; return _kern_get_thread_info(thread, info); }
int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) { thread_info info; status_t status = _kern_get_thread_info(thread->id, &info); if (status == B_BAD_THREAD_ID) return ESRCH; param->sched_priority = info.priority; if (policy != NULL) *policy = SCHED_RR; return 0; }