提交 b17c75a4 编写于 作者: R Rich Felker

fix syscall argument bug in pthread_getschedparam

the address of the pointer to the sched param, rather than the
pointer, was being passed to the kernel.
上级 7c20a118
...@@ -7,7 +7,7 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param ...@@ -7,7 +7,7 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param
if (t->dead) { if (t->dead) {
r = ESRCH; r = ESRCH;
} else { } else {
r = -__syscall(SYS_sched_getparam, t->tid, &param); r = -__syscall(SYS_sched_getparam, t->tid, param);
if (!r) { if (!r) {
*policy = __syscall(SYS_sched_getscheduler, t->tid); *policy = __syscall(SYS_sched_getscheduler, t->tid);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册