X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_attr_setinheritsched.c;h=ca264be7c4d969a9dd12cbd8a80c6a1911533473;hb=f897461d4fe72bb71854a6d0662de83008caccb7;hp=e540e846f8849e5fc42a7d0360038c30d3514bf6;hpb=40bae2d32fd6f3ffea437fa745ad38a1fe77b27e;p=musl diff --git a/src/thread/pthread_attr_setinheritsched.c b/src/thread/pthread_attr_setinheritsched.c index e540e846..ca264be7 100644 --- a/src/thread/pthread_attr_setinheritsched.c +++ b/src/thread/pthread_attr_setinheritsched.c @@ -1,26 +1,6 @@ #include "pthread_impl.h" #include "syscall.h" -__attribute__((__visibility__("hidden"))) -void *__start_sched(void *p) -{ - struct start_sched_args *ssa = p; - void *start_arg = ssa->start_arg; - void *(*start_fn)(void *) = ssa->start_fn; - pthread_t self = __pthread_self(); - - int ret = -__syscall(SYS_sched_setscheduler, self->tid, - ssa->attr->_a_policy, &ssa->attr->_a_prio); - if (!ret) __restore_sigs(&ssa->mask); - a_store(&ssa->futex, ret); - __wake(&ssa->futex, 1, 1); - if (ret) { - self->detach_state = DT_DYNAMIC; - return 0; - } - return start_fn(start_arg); -} - int pthread_attr_setinheritsched(pthread_attr_t *a, int inherit) { if (inherit > 1U) return EINVAL;