Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 45) sorted by relevance

12

/libpthread/nptl/sysdeps/pthread/
A Dtpp.c42 struct pthread *self = THREAD_SELF; in __pthread_tpp_change_priority() local
57 THREAD_SETMEM (self, tpp, tpp); in __pthread_tpp_change_priority()
103 if (__sched_getparam (self->tid, &self->schedparam) != 0) in __pthread_tpp_change_priority()
106 self->flags |= ATTR_FLAG_SCHED_SET; in __pthread_tpp_change_priority()
111 self->schedpolicy = __sched_getscheduler (self->tid); in __pthread_tpp_change_priority()
112 if (self->schedpolicy == -1) in __pthread_tpp_change_priority()
126 if (__sched_setscheduler (self->tid, self->schedpolicy, &sp) < 0) in __pthread_tpp_change_priority()
150 if (__sched_getparam (self->tid, &self->schedparam) != 0) in __pthread_current_priority()
153 self->flags |= ATTR_FLAG_SCHED_SET; in __pthread_current_priority()
158 self->schedpolicy = __sched_getscheduler (self->tid); in __pthread_current_priority()
[all …]
/libpthread/linuxthreads/
A Dsemaphore.c52 __pthread_lock(&sem->__sem_lock, self); in new_sem_extricate_func()
69 __pthread_lock(&sem->__sem_lock, self); in sem_wait()
76 THREAD_SETMEM(self, p_sem_avail, 0); in sem_wait()
79 if (!(THREAD_GETMEM(self, p_canceled) in sem_wait()
81 enqueue(&sem->__sem_waiting, self); in sem_wait()
94 suspend(self); in sem_wait()
136 pthread_descr self = thread_self(); in sem_post() local
210 pthread_descr self = thread_self(); in sem_timedwait() local
234 THREAD_SETMEM(self, p_sem_avail, 0); in sem_timedwait()
237 if (!(THREAD_GETMEM(self, p_canceled) in sem_timedwait()
[all …]
A Drestart.h31 static __inline__ void suspend(pthread_descr self) in suspend() argument
35 __pthread_wait_for_restart_signal(self); in suspend()
37 __pthread_suspend(self); in suspend()
41 static __inline__ int timedsuspend(pthread_descr self, in timedsuspend() argument
46 return __pthread_timedsuspend_new(self, abstime); in timedsuspend()
48 return __pthread_timedsuspend(self, abstime); in timedsuspend()
A Djoin.c40 PDEBUG("self=%p, pid=%d\n", self, self->p_pid); in libpthread_hidden_def()
53 __pthread_lock(THREAD_GETMEM(self, p_lock), self); in libpthread_hidden_def()
63 | THREAD_GETMEM_NC(self, in libpthread_hidden_def()
69 THREAD_SETMEM(self, p_eventbuf.eventdata, self); in libpthread_hidden_def()
92 suspend(self); in libpthread_hidden_def()
142 if (th == self) { in pthread_join()
157 th->p_joining = self; in pthread_join()
168 suspend(self); in pthread_join()
215 if (th == self) { in pthread_tryjoin_np()
265 if (th == self) { in pthread_timedjoin_np()
[all …]
A Derrno.c26 pthread_descr self = thread_self(); in __errno_location() local
27 return THREAD_GETMEM (self, p_errnop); in __errno_location()
33 pthread_descr self = thread_self(); in __h_errno_location() local
34 return THREAD_GETMEM (self, p_h_errnop); in __h_errno_location()
A Dcancel.c39 pthread_descr self = thread_self(); in libpthread_hidden_proto() local
44 if (THREAD_GETMEM(self, p_canceled) && in libpthread_hidden_proto()
54 pthread_descr self = thread_self(); in libpthread_hidden_def() local
59 if (THREAD_GETMEM(self, p_canceled) && in libpthread_hidden_def()
127 pthread_descr self = thread_self(); in pthread_testcancel() local
128 if (THREAD_GETMEM(self, p_canceled) in pthread_testcancel()
136 pthread_descr self = thread_self(); in _pthread_cleanup_push() local
148 pthread_descr self = thread_self(); in _pthread_cleanup_pop() local
156 pthread_descr self = thread_self(); in _pthread_cleanup_push_defer() local
171 pthread_descr self = thread_self(); in strong_alias() local
[all …]
A Dcondvar.c54 __pthread_lock(&cond->__c_lock, self); in libpthread_hidden_def()
71 && mutex->__m_owner != self) in pthread_cond_wait()
89 __pthread_lock(&cond->__c_lock, self); in pthread_cond_wait()
90 if (!(THREAD_GETMEM(self, p_canceled) in pthread_cond_wait()
92 enqueue(&cond->__c_waiting, self); in pthread_cond_wait()
107 suspend(self); in pthread_cond_wait()
133 restart(self); in pthread_cond_wait()
153 && mutex->__m_owner != self) in libpthread_hidden_def()
168 enqueue(&cond->__c_waiting, self); in libpthread_hidden_def()
200 suspend(self); in libpthread_hidden_def()
[all …]
A Dlocale.c29 pthread_descr self = thread_self(); in __curlocale() local
32 return THREAD_GETMEM (self, locale); in __curlocale()
35 __locale_t r = THREAD_GETMEM (self, locale); in __curlocale()
47 pthread_descr self = thread_self(); in __curlocale_set() local
49 oldloc = THREAD_GETMEM (self, locale); in __curlocale_set()
54 THREAD_SETMEM (self, locale, newloc); in __curlocale_set()
A Drwlock.c73 self->p_readlock_list = info; in rwlock_add_to_list()
158 pthread_descr self = *pself; in rwlock_have_already() local
162 if (!self) in rwlock_have_already()
163 self = thread_self(); in rwlock_have_already()
179 *pself = self; in rwlock_have_already()
229 pthread_descr self = NULL; in pthread_rwlock_rdlock() local
238 if (self == NULL) in pthread_rwlock_rdlock()
239 self = thread_self (); in pthread_rwlock_rdlock()
259 self->p_untracked_readlock_count++; in pthread_rwlock_rdlock()
317 rwlock->__rw_writer = self; in pthread_rwlock_wrlock()
[all …]
A Dspecific.c63 pthread_descr self = thread_self(); in pthread_key_delete() local
84 th = self; in pthread_key_delete()
90 } while (th != self); in pthread_key_delete()
101 pthread_descr self = thread_self(); in pthread_setspecific() local
112 THREAD_SETMEM_NC(self, p_specific[idx1st], newp); in pthread_setspecific()
122 pthread_descr self = thread_self(); in pthread_getspecific() local
139 pthread_descr self = thread_self(); in __pthread_destroy_specifics() local
160 __pthread_lock(THREAD_GETMEM(self, p_lock), self); in __pthread_destroy_specifics()
163 free(THREAD_GETMEM_NC(self, p_specific[i])); in __pthread_destroy_specifics()
164 THREAD_SETMEM_NC(self, p_specific[i], NULL); in __pthread_destroy_specifics()
[all …]
A Dptlongjmp.c26 pthread_descr self = thread_self(); in pthread_cleanup_upto() local
30 for (c = THREAD_GETMEM(self, p_cleanup); in pthread_cleanup_upto()
51 THREAD_SETMEM(self, p_cleanup, c); in pthread_cleanup_upto()
52 if (THREAD_GETMEM(self, p_in_sighandler) in pthread_cleanup_upto()
53 && _JMPBUF_UNWINDS(target, THREAD_GETMEM(self, p_in_sighandler))) in pthread_cleanup_upto()
54 THREAD_SETMEM(self, p_in_sighandler, NULL); in pthread_cleanup_upto()
A Dsignals.c87 pthread_descr self = thread_self(); in pthread_sighandler() local
91 if (THREAD_GETMEM(self, p_sigwaiting)) { in pthread_sighandler()
92 THREAD_SETMEM(self, p_sigwaiting, 0); in pthread_sighandler()
93 THREAD_SETMEM(self, p_signal, signo); in pthread_sighandler()
110 pthread_descr self = thread_self(); in pthread_sighandler_rt() local
114 if (THREAD_GETMEM(self, p_sigwaiting)) { in pthread_sighandler_rt()
115 THREAD_SETMEM(self, p_sigwaiting, 0); in pthread_sighandler_rt()
116 THREAD_SETMEM(self, p_signal, signo); in pthread_sighandler_rt()
221 if (! (THREAD_GETMEM(self, p_canceled) in sigwait()
224 THREAD_SETMEM(self, p_signal, 0); in sigwait()
[all …]
/libpthread/nptl/
A Dcancellation.c31 struct pthread *self = THREAD_SELF; in __pthread_enable_asynccancel() local
32 int oldval = THREAD_GETMEM (self, cancelhandling); in __pthread_enable_asynccancel()
41 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, in __pthread_enable_asynccancel()
47 THREAD_SETMEM (self, result, PTHREAD_CANCELED); in __pthread_enable_asynccancel()
71 struct pthread *self = THREAD_SELF; in __pthread_disable_asynccancel() local
74 int oldval = THREAD_GETMEM (self, cancelhandling); in __pthread_disable_asynccancel()
80 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, in __pthread_disable_asynccancel()
96 lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); in __pthread_disable_asynccancel()
97 newval = THREAD_GETMEM (self, cancelhandling); in __pthread_disable_asynccancel()
A Dcleanup_defer.c28 struct pthread *self = THREAD_SELF; in __pthread_register_cancel_defer() local
31 ibuf->priv.data.prev = THREAD_GETMEM (self, cleanup_jmp_buf); in __pthread_register_cancel_defer()
32 ibuf->priv.data.cleanup = THREAD_GETMEM (self, cleanup); in __pthread_register_cancel_defer()
34 int cancelhandling = THREAD_GETMEM (self, cancelhandling); in __pthread_register_cancel_defer()
40 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, in __pthread_register_cancel_defer()
57 THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf); in __pthread_register_cancel_defer()
65 struct pthread *self = THREAD_SELF; in __pthread_unregister_cancel_restore() local
68 THREAD_SETMEM (self, cleanup_jmp_buf, ibuf->priv.data.prev); in __pthread_unregister_cancel_restore()
72 && ((cancelhandling = THREAD_GETMEM (self, cancelhandling)) in __pthread_unregister_cancel_restore()
77 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, in __pthread_unregister_cancel_restore()
[all …]
A Dcleanup_defer_compat.c29 struct pthread *self = THREAD_SELF; in __pthread_cleanup_push_defer() local
33 buffer->__prev = THREAD_GETMEM (self, cleanup); in __pthread_cleanup_push_defer()
35 int cancelhandling = THREAD_GETMEM (self, cancelhandling); in __pthread_cleanup_push_defer()
41 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, in __pthread_cleanup_push_defer()
57 THREAD_SETMEM (self, cleanup, buffer); in __pthread_cleanup_push_defer()
68 struct pthread *self = THREAD_SELF; in strong_alias() local
70 THREAD_SETMEM (self, cleanup, buffer->__prev); in strong_alias()
74 && ((cancelhandling = THREAD_GETMEM (self, cancelhandling)) in strong_alias()
79 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, in strong_alias()
91 CANCELLATION_P (self); in strong_alias()
A Dpthread_tryjoin.c31 struct pthread *self; in pthread_tryjoin_np() local
44 self = THREAD_SELF; in pthread_tryjoin_np()
45 if (pd == self || self->joinid == pd) in pthread_tryjoin_np()
61 if (atomic_compare_and_exchange_bool_acq (&pd->joinid, self, NULL)) in pthread_tryjoin_np()
A Dcleanup_compat.c29 struct pthread *self = THREAD_SELF; in _pthread_cleanup_push() local
33 buffer->__prev = THREAD_GETMEM (self, cleanup); in _pthread_cleanup_push()
35 THREAD_SETMEM (self, cleanup, buffer); in _pthread_cleanup_push()
45 struct pthread *self __attribute ((unused)) = THREAD_SELF; in strong_alias()
47 THREAD_SETMEM (self, cleanup, buffer->__prev); in strong_alias()
A Dpthread_setspecific.c30 struct pthread *self; in __pthread_setspecific() local
36 self = THREAD_SELF; in __pthread_setspecific()
47 level2 = &self->specific_1stblock[key]; in __pthread_setspecific()
51 THREAD_SETMEM (self, specific_used, true); in __pthread_setspecific()
64 level2 = THREAD_GETMEM_NC (self, specific, idx1st); in __pthread_setspecific()
78 THREAD_SETMEM_NC (self, specific, idx1st, level2); in __pthread_setspecific()
85 THREAD_SETMEM (self, specific_used, true); in __pthread_setspecific()
A Dpthread_setcanceltype.c30 volatile struct pthread *self; in __pthread_setcanceltype() local
35 self = THREAD_SELF; in __pthread_setcanceltype()
37 int oldval = THREAD_GETMEM (self, cancelhandling); in __pthread_setcanceltype()
57 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, in __pthread_setcanceltype()
63 THREAD_SETMEM (self, result, PTHREAD_CANCELED); in __pthread_setcanceltype()
A Dpt-cleanup.c28 struct pthread *self = THREAD_SELF; in __pthread_cleanup_upto() local
34 uintptr_t adj = (uintptr_t) self->stackblock + self->stackblock_size; in __pthread_cleanup_upto()
37 for (cbuf = THREAD_GETMEM (self, cleanup); in __pthread_cleanup_upto()
61 THREAD_SETMEM (self, cleanup, cbuf); in __pthread_cleanup_upto()
A Dpthread_timedjoin.c38 struct pthread *self; in pthread_timedjoin_np() local
52 self = THREAD_SELF; in pthread_timedjoin_np()
53 if (pd == self || self->joinid == pd) in pthread_timedjoin_np()
66 self, NULL), 0)) in pthread_timedjoin_np()
A Dcleanup.c28 struct pthread *self = THREAD_SELF; in __pthread_register_cancel() local
31 ibuf->priv.data.prev = THREAD_GETMEM (self, cleanup_jmp_buf); in __pthread_register_cancel()
32 ibuf->priv.data.cleanup = THREAD_GETMEM (self, cleanup); in __pthread_register_cancel()
35 THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf); in __pthread_register_cancel()
A Dpthread_setcancelstate.c30 volatile struct pthread *self; in __pthread_setcancelstate() local
35 self = THREAD_SELF; in __pthread_setcancelstate()
37 int oldval = THREAD_GETMEM (self, cancelhandling); in __pthread_setcancelstate()
57 int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval, in __pthread_setcancelstate()
A Dpthread_join.c54 struct pthread *self = THREAD_SELF; in pthread_join() local
65 if ((pd == self in pthread_join()
66 || (self->joinid == pd in pthread_join()
70 && !CANCEL_ENABLED_AND_CANCELED (self->cancelhandling)) in pthread_join()
82 self, in pthread_join()
A Dunwind.c46 struct pthread *self = THREAD_SELF; in unwind_stop() local
47 struct _pthread_cleanup_buffer *curp = THREAD_GETMEM (self, cleanup); in unwind_stop()
53 uintptr_t adj = (uintptr_t) self->stackblock + self->stackblock_size; in unwind_stop()
90 THREAD_SETMEM (self, cleanup, curp); in unwind_stop()
125 struct pthread *self = THREAD_SELF; in __cleanup_fct_attribute() local
130 THREAD_SETMEM (self, exc.exception_class, 0); in __cleanup_fct_attribute()
131 THREAD_SETMEM (self, exc.exception_cleanup, unwind_cleanup); in __cleanup_fct_attribute()
133 _Unwind_ForcedUnwind (&self->exc, unwind_stop, ibuf); in __cleanup_fct_attribute()
139 struct _pthread_cleanup_buffer *curp = THREAD_GETMEM (self, cleanup); in __cleanup_fct_attribute()
157 THREAD_SETMEM (self, cleanup, curp); in __cleanup_fct_attribute()

Completed in 21 milliseconds

12