Browse Source

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.
Rich Felker 11 năm trước cách đây
mục cha
commit
b17c75a4d5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/thread/pthread_getschedparam.c

+ 1 - 1
src/thread/pthread_getschedparam.c

@@ -7,7 +7,7 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param
 	if (t->dead) {
 		r = ESRCH;
 	} else {
-		r = -__syscall(SYS_sched_getparam, t->tid, &param);
+		r = -__syscall(SYS_sched_getparam, t->tid, param);
 		if (!r) {
 			*policy = __syscall(SYS_sched_getscheduler, t->tid);
 		}