| OLD | NEW |
| 1 #include "pthread_impl.h" | 1 #include "pthread_impl.h" |
| 2 | 2 |
| 3 int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param
*restrict param) | 3 int pthread_getschedparam(pthread_t t, |
| 4 { | 4 int* restrict policy, |
| 5 » int r; | 5 struct sched_param* restrict param) { |
| 6 » __lock(t->killlock); | 6 int r; |
| 7 » if (t->dead) { | 7 __lock(t->killlock); |
| 8 » » r = ESRCH; | 8 if (t->dead) { |
| 9 » } else { | 9 r = ESRCH; |
| 10 » » r = -__syscall(SYS_sched_getparam, t->tid, param); | 10 } else { |
| 11 » » if (!r) { | 11 r = -__syscall(SYS_sched_getparam, t->tid, param); |
| 12 » » » *policy = __syscall(SYS_sched_getscheduler, t->tid); | 12 if (!r) { |
| 13 » » } | 13 *policy = __syscall(SYS_sched_getscheduler, t->tid); |
| 14 » } | 14 } |
| 15 » __unlock(t->killlock); | 15 } |
| 16 » return r; | 16 __unlock(t->killlock); |
| 17 return r; |
| 17 } | 18 } |
| OLD | NEW |