/nptl/ |
A D | pthread_getschedparam.c | 31 if (INVALID_TD_P (pd)) in __pthread_getschedparam() 38 lll_lock (pd->lock, LLL_PRIVATE); in __pthread_getschedparam() 45 if ((pd->flags & ATTR_FLAG_SCHED_SET) == 0) in __pthread_getschedparam() 47 if (__sched_getparam (pd->tid, &pd->schedparam) != 0) in __pthread_getschedparam() 50 pd->flags |= ATTR_FLAG_SCHED_SET; in __pthread_getschedparam() 53 if ((pd->flags & ATTR_FLAG_POLICY_SET) == 0) in __pthread_getschedparam() 55 pd->schedpolicy = __sched_getscheduler (pd->tid); in __pthread_getschedparam() 56 if (pd->schedpolicy == -1) in __pthread_getschedparam() 59 pd->flags |= ATTR_FLAG_POLICY_SET; in __pthread_getschedparam() 64 *policy = pd->schedpolicy; in __pthread_getschedparam() [all …]
|
A D | pthread_create.c | 324 pd->schedpolicy, &pd->schedparam); in create_thread() 428 LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg); in start_thread() 442 ret = pd->start_routine (pd->arg); in start_thread() 473 pd->eventbuf.eventdata = pd; in start_thread() 478 pd, pd->nextevent)); in start_thread() 551 advise_stack_range (pd->stackblock, pd->stackblock_size, (uintptr_t) pd, in start_thread() 666 pd->header.self = pd; in __pthread_create_2_1() 669 pd->header.tcb = pd; in __pthread_create_2_1() 676 pd->arg = arg; in __pthread_create_2_1() 813 pd->eventbuf.eventdata = pd; in __pthread_create_2_1() [all …]
|
A D | pthread_join_common.c | 40 struct pthread *pd = (struct pthread *) threadid; in __pthread_clockjoin_ex() local 43 if (INVALID_NOT_TERMINATED_TD_P (pd)) in __pthread_clockjoin_ex() 48 if (IS_DETACHED (pd)) in __pthread_clockjoin_ex() 57 if ((pd == self in __pthread_clockjoin_ex() 58 || (self->joinid == pd in __pthread_clockjoin_ex() 59 && (pd->cancelhandling in __pthread_clockjoin_ex() 92 pthread_cleanup_push (cleanup, &pd->joinid); in __pthread_clockjoin_ex() 117 void *pd_result = pd->result; in __pthread_clockjoin_ex() 121 pd->tid = -1; in __pthread_clockjoin_ex() 128 __nptl_free_tcb (pd); in __pthread_clockjoin_ex() [all …]
|
A D | pthread_setschedparam.c | 29 struct pthread *pd = (struct pthread *) threadid; in __pthread_setschedparam() local 32 if (INVALID_TD_P (pd)) in __pthread_setschedparam() 39 lll_lock (pd->lock, LLL_PRIVATE); in __pthread_setschedparam() 46 if (__builtin_expect (pd->tpp != NULL, 0) in __pthread_setschedparam() 47 && pd->tpp->priomax > param->sched_priority) in __pthread_setschedparam() 50 p.sched_priority = pd->tpp->priomax; in __pthread_setschedparam() 55 if (__builtin_expect (__sched_setscheduler (pd->tid, policy, in __pthread_setschedparam() 62 pd->schedpolicy = policy; in __pthread_setschedparam() 63 memcpy (&pd->schedparam, orig_param, sizeof (struct sched_param)); in __pthread_setschedparam() 64 pd->flags |= ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET; in __pthread_setschedparam() [all …]
|
A D | nptl_free_tcb.c | 24 __nptl_free_tcb (struct pthread *pd) in __nptl_free_tcb() argument 27 if (atomic_bit_test_set (&pd->cancelhandling, TERMINATED_BIT) == 0) in __nptl_free_tcb() 30 if (pd->tpp != NULL) in __nptl_free_tcb() 32 struct priority_protection_data *tpp = pd->tpp; in __nptl_free_tcb() 34 pd->tpp = NULL; in __nptl_free_tcb() 41 __nptl_deallocate_stack (pd); in __nptl_free_tcb()
|
A D | pthread_setschedprio.c | 29 struct pthread *pd = (struct pthread *) threadid; in __pthread_setschedprio() local 32 if (INVALID_TD_P (pd)) in __pthread_setschedprio() 41 lll_lock (pd->lock, LLL_PRIVATE); in __pthread_setschedprio() 45 if (__builtin_expect (pd->tpp != NULL, 0) && pd->tpp->priomax > prio) in __pthread_setschedprio() 46 param.sched_priority = pd->tpp->priomax; in __pthread_setschedprio() 49 if (__glibc_unlikely (__sched_setparam (pd->tid, ¶m) == -1)) in __pthread_setschedprio() 56 memcpy (&pd->schedparam, ¶m, sizeof (struct sched_param)); in __pthread_setschedprio() 57 pd->flags |= ATTR_FLAG_SCHED_SET; in __pthread_setschedprio() 60 lll_unlock (pd->lock, LLL_PRIVATE); in __pthread_setschedprio()
|
A D | pthread_detach.c | 26 struct pthread *pd = (struct pthread *) th; in ___pthread_detach() local 29 if (INVALID_NOT_TERMINATED_TD_P (pd)) in ___pthread_detach() 36 if (atomic_compare_and_exchange_bool_acq (&pd->joinid, pd, NULL)) in ___pthread_detach() 42 if (IS_DETACHED (pd)) in ___pthread_detach() 48 if ((pd->cancelhandling & EXITING_BITMASK) != 0) in ___pthread_detach() 51 __nptl_free_tcb (pd); in ___pthread_detach()
|
A D | allocatestack.c | 218 struct pthread *pd; in allocate_stack() local 285 pd->specific[0] = pd->specific_1stblock; in allocate_stack() 365 if (pd == NULL) in allocate_stack() 405 pd->stackblock = mem; in allocate_stack() 414 pd->specific[0] = pd->specific_1stblock; in allocate_stack() 427 pd->setxid_futex = -1; in allocate_stack() 531 char *old_guard = (char *)(((uintptr_t) pd - pd->guardsize) in allocate_stack() 560 pd->robust_prev = &pd->robust_head; in allocate_stack() 562 pd->robust_head.list = &pd->robust_head; in allocate_stack() 565 *pdp = pd; in allocate_stack() [all …]
|
A D | default-sched.h | 27 collect_default_sched (struct pthread *pd) in collect_default_sched() argument 29 assert ((pd->flags & (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET)) != 0); in collect_default_sched()
|
A D | pthread_cancel.c | 62 volatile struct pthread *pd = (volatile struct pthread *) th; in __pthread_cancel() local 64 if (pd->tid == 0) in __pthread_cancel() 95 int oldch = atomic_fetch_or_acquire (&pd->cancelhandling, CANCELED_BITMASK); in __pthread_cancel() 99 if (pd == THREAD_SELF) in __pthread_cancel() 110 THREAD_SETMEM (pd, result, PTHREAD_CANCELED); in __pthread_cancel() 111 if (pd->cancelstate == PTHREAD_CANCEL_ENABLE in __pthread_cancel() 112 && pd->canceltype == PTHREAD_CANCEL_ASYNCHRONOUS) in __pthread_cancel()
|
A D | pthread_kill.c | 30 struct pthread *pd = (struct pthread *) threadid; in __pthread_kill_implementation() local 31 if (pd == THREAD_SELF) in __pthread_kill_implementation() 50 __libc_lock_lock (pd->exit_lock); in __pthread_kill_implementation() 53 if (pd->exiting) in __pthread_kill_implementation() 62 ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), pd->tid, signo); in __pthread_kill_implementation() 66 __libc_lock_unlock (pd->exit_lock); in __pthread_kill_implementation()
|
A D | pthread_getcpuclockid.c | 29 struct pthread *pd = (struct pthread *) threadid; in __pthread_getcpuclockid() local 32 if (INVALID_TD_P (pd)) in __pthread_getcpuclockid() 38 const clockid_t tidclock = MAKE_THREAD_CPUCLOCK (pd->tid, CPUCLOCK_SCHED); in __pthread_getcpuclockid()
|
A D | nptl-stack.h | 32 __nptl_stack_in_use (struct pthread *pd) in __nptl_stack_in_use() argument 34 return pd->tid <= 0; in __nptl_stack_in_use() 47 extern void __nptl_deallocate_stack (struct pthread *pd);
|
A D | pthread_tryjoin.c | 25 struct pthread *pd = (struct pthread *) threadid; in __pthread_tryjoin_np() local 26 if (pd->tid != 0) in __pthread_tryjoin_np()
|
A D | nptl-stack.c | 110 __nptl_deallocate_stack (struct pthread *pd) in __nptl_deallocate_stack() argument 116 __nptl_stack_list_del (&pd->list); in __nptl_deallocate_stack() 122 if (__glibc_likely (! pd->user_stack)) in __nptl_deallocate_stack() 123 (void) queue_stack (pd); in __nptl_deallocate_stack() 126 _dl_deallocate_tls (TLS_TPADJ (pd), false); in __nptl_deallocate_stack()
|
A D | pthread_setname.c | 33 const struct pthread *pd = (const struct pthread *) th; in __pthread_setname_np() local 42 if (pd == THREAD_SELF) in __pthread_setname_np() 47 sprintf (fname, FMT, (unsigned int) pd->tid); in __pthread_setname_np()
|
A D | pthread_getname.c | 32 const struct pthread *pd = (const struct pthread *) th; in __pthread_getname_np() local 40 if (pd == THREAD_SELF) in __pthread_getname_np() 45 sprintf (fname, FMT, (unsigned int) pd->tid); in __pthread_getname_np()
|
A D | pthread_setaffinity.c | 29 const struct pthread *pd = (const struct pthread *) th; in __pthread_setaffinity_new() local 32 res = INTERNAL_SYSCALL_CALL (sched_setaffinity, pd->tid, cpusetsize, in __pthread_setaffinity_new()
|
A D | pthread_getaffinity.c | 31 const struct pthread *pd = (const struct pthread *) th; in __pthread_getaffinity_np() local 33 int res = INTERNAL_SYSCALL_CALL (sched_getaffinity, pd->tid, in __pthread_getaffinity_np()
|
A D | descr.h | 348 #define IS_DETACHED(pd) ((pd)->joinid == (pd)) argument 422 # define TLS_TPADJ(pd) (pd) argument 424 # define TLS_TPADJ(pd) ((struct pthread *)((char *) (pd) + TLS_PRE_TCB_SIZE)) argument
|
A D | pthread_sigqueue.c | 31 struct pthread *pd = (struct pthread *) threadid; in __pthread_sigqueue() local 36 pid_t tid = atomic_forced_read (pd->tid); in __pthread_sigqueue()
|