kernel: pthread: correcting pthread_setschedparam.
pthread_setschedparam() uses k_thread_priority_set() to set pthread priority. There is an error in argument in k_thread_priority_seti() due to which system correct priority was not set. Correcting this error. Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
This commit is contained in:
parent
5dd4ac9270
commit
d60ef8b74a
|
@ -250,7 +250,7 @@ int pthread_cancel(pthread_t pthread)
|
|||
int pthread_setschedparam(pthread_t pthread, int policy,
|
||||
const struct sched_param *param)
|
||||
{
|
||||
k_tid_t *thread = (k_tid_t *)pthread;
|
||||
k_tid_t thread = (k_tid_t)pthread;
|
||||
int new_prio;
|
||||
|
||||
if (thread == NULL) {
|
||||
|
@ -267,7 +267,7 @@ int pthread_setschedparam(pthread_t pthread, int policy,
|
|||
return EINVAL;
|
||||
}
|
||||
|
||||
k_thread_priority_set(*thread, new_prio);
|
||||
k_thread_priority_set(thread, new_prio);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue