| /openbsd/src/lib/librthread/ |
| D | rthread.c | 103 struct tib *tib = TIB_GET(); in sigthr_handler() local 104 pthread_t self = tib->tib_thread; in sigthr_handler() 112 if (!tib->tib_canceled || tib->tib_cantcancel) in sigthr_handler() 120 if (tib->tib_cancel_point & CANCEL_POINT_DELAYED) { in sigthr_handler() 129 if (tib->tib_cancel_point || in sigthr_handler() 130 (tib->tib_thread_flags & TIB_THREAD_ASYNC_CANCEL)) in sigthr_handler() 255 if (thread->tib->tib_tid != 0) in _rthread_reaper() 263 _dl_free_tib(thread->tib, sizeof(*thread)); in _rthread_reaper() 268 _dl_free_tib(thread->tib, 0); in _rthread_reaper() 283 struct tib *tib = TIB_GET(); in pthread_join() local [all …]
|
| D | rthread_sem_compat.c | 234 struct tib *tib = TIB_GET(); in sem_wait() local 238 PREP_CANCEL_POINT(tib); in sem_wait() 242 self = tib->tib_thread; in sem_wait() 249 ENTER_DELAYED_CANCEL_POINT(tib, self); in sem_wait() 251 LEAVE_CANCEL_POINT_INNER(tib, r); in sem_wait() 264 struct tib *tib = TIB_GET(); in sem_timedwait() local 268 PREP_CANCEL_POINT(tib); in sem_timedwait() 277 self = tib->tib_thread; in sem_timedwait() 279 ENTER_DELAYED_CANCEL_POINT(tib, self); in sem_timedwait() 281 LEAVE_CANCEL_POINT_INNER(tib, r); in sem_timedwait()
|
| D | rthread_sem.c | 219 struct tib *tib = TIB_GET(); in sem_wait() local 223 PREP_CANCEL_POINT(tib); in sem_wait() 227 self = tib->tib_thread; in sem_wait() 234 ENTER_DELAYED_CANCEL_POINT(tib, self); in sem_wait() 236 LEAVE_CANCEL_POINT_INNER(tib, error); in sem_wait() 251 struct tib *tib = TIB_GET(); in sem_timedwait() local 255 PREP_CANCEL_POINT(tib); in sem_timedwait() 264 self = tib->tib_thread; in sem_timedwait() 266 ENTER_DELAYED_CANCEL_POINT(tib, self); in sem_timedwait() 268 LEAVE_CANCEL_POINT_INNER(tib, error); in sem_timedwait()
|
| D | rthread_fork.c | 81 struct tib *tib = me->tib; in _dofork() local 88 tib->tib_tid = getthrid(); in _dofork()
|
| D | rthread_np.c | 48 tid = thread->tib->tib_tid; in pthread_set_name_np() 58 tid = thread->tib->tib_tid; in pthread_get_name_np() 94 } else if (thread->tib->tib_thread_flags & TIB_THREAD_INITIAL_STACK) { in pthread_stackseg_np()
|
| D | rthread_getcpuclockid.c | 28 thread->tib->tib_tid); in pthread_getcpuclockid()
|
| /openbsd/src/include/ |
| D | tib.h | 137 struct tib { struct 177 struct tib { struct 179 struct tib *__tib_self; argument 195 # define _TIB_PREP(tib) \ argument 196 ((void)((tib)->__tib_self = (tib))) 207 # define _TIB_PREP(tib) ((void)0) argument 210 #define TIB_INIT(tib, dtv, thread) do { \ argument 211 (tib)->tib_thread = (thread); \ 212 (tib)->tib_atexit = NULL; \ 213 (tib)->tib_locale = NULL; \ [all …]
|
| /openbsd/src/libexec/ld.so/ |
| D | tib.c | 36 # define TIB_ALIGN MAXIMUM(__alignof__(struct tib), TIB_EXTRA_ALIGN) 38 # define TIB_ALIGN __alignof__(struct tib) 61 struct tib *tib; in allocate_tib() local 70 static_tls_align_offset + sizeof *tib + static_tls_size); in allocate_tib() 73 tib = (struct tib *)(base + unpad_extra + static_tls_align_offset); in allocate_tib() 76 #define TLS_ADDR(tibp, offset) ((char *)(tibp) + sizeof(struct tib) + (offset)) in allocate_tib() 81 static_tls_align_offset + ELF_ROUND(sizeof *tib, TIB_EXTRA_ALIGN) + in allocate_tib() 86 tib = (struct tib *)(base + static_tls_size); in allocate_tib() 88 thread = (char *)tib + ELF_ROUND(sizeof *tib, TIB_EXTRA_ALIGN); in allocate_tib() 95 char *addr = TLS_ADDR(tib, obj->tls_offset); in allocate_tib() [all …]
|
| /openbsd/src/lib/libc/thread/ |
| D | rthread.c | 77 struct tib *tib; in _rthread_init() local 82 tib = TIB_GET(); in _rthread_init() 83 tib->tib_thread = thread; in _rthread_init() 84 thread->tib = tib; in _rthread_init() 87 tib->tib_thread_flags = TIB_THREAD_INITIAL_STACK; in _rthread_init() 125 struct tib *tib; in pthread_exit() local 128 tib = thread->tib; in pthread_exit() 130 if (tib->tib_cantcancel & CANCEL_DYING) { in pthread_exit() 139 tib->tib_cantcancel |= CANCEL_DYING; in pthread_exit() 155 __threxit(&tib->tib_tid); in pthread_exit()
|
| D | rthread_cond.c | 75 struct tib *tib = TIB_GET(); in _rthread_cond_timedwait() local 76 pthread_t self = tib->tib_thread; in _rthread_cond_timedwait() 80 PREP_CANCEL_POINT(tib); in _rthread_cond_timedwait() 85 ENTER_DELAYED_CANCEL_POINT(tib, self); in _rthread_cond_timedwait() 93 LEAVE_CANCEL_POINT_INNER(tib, 1); in _rthread_cond_timedwait() 113 (tib->tib_canceled == 0 || (tib->tib_cantcancel & CANCEL_DISABLED))); in _rthread_cond_timedwait() 127 LEAVE_CANCEL_POINT_INNER(tib, canceled); in _rthread_cond_timedwait()
|
| D | rthread_sync.c | 290 struct tib *tib = TIB_GET(); in pthread_cond_timedwait() local 291 pthread_t self = tib->tib_thread; in pthread_cond_timedwait() 297 PREP_CANCEL_POINT(tib); in pthread_cond_timedwait() 324 ENTER_DELAYED_CANCEL_POINT(tib, self); in pthread_cond_timedwait() 335 LEAVE_CANCEL_POINT_INNER(tib, 1); in pthread_cond_timedwait() 379 (tib->tib_canceled == 0 || in pthread_cond_timedwait() 380 (tib->tib_cantcancel & CANCEL_DISABLED))) { in pthread_cond_timedwait() 392 LEAVE_CANCEL_POINT_INNER(tib, 0); in pthread_cond_timedwait() 436 LEAVE_CANCEL_POINT_INNER(tib, canceled); in pthread_cond_timedwait() 446 struct tib *tib = TIB_GET(); in pthread_cond_wait() local [all …]
|
| /openbsd/src/lib/libc/dlfcn/ |
| D | init.c | 41 # define TIB_ALIGN MAX(__alignof__(struct tib), TIB_EXTRA_ALIGN) 43 # define TIB_ALIGN __alignof__(struct tib) 260 struct tib *tib; in setup_static_tib() local 288 ELF_ROUND(sizeof(struct tib), _static_tls_align) - in setup_static_tib() 289 sizeof(struct tib); in setup_static_tib() 317 + sizeof *tib, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); in setup_static_tib() 319 tib = _static_tls_init(base, NULL); in setup_static_tib() 320 tib->tib_tid = getthrid(); in setup_static_tib() 321 TCB_SET(TIB_TO_TCB(tib)); in setup_static_tib() 323 _libc_single_tcb = TIB_TO_TCB(tib); in setup_static_tib() [all …]
|
| D | tib.c | 54 _static_tls_align_offset + sizeof(struct tib) + in _dl_allocate_tib() 64 ELF_ROUND(sizeof(struct tib), TIB_EXTRA_ALIGN) + extra) != 0) in _dl_allocate_tib() 67 ELF_ROUND(sizeof(struct tib), TIB_EXTRA_ALIGN); in _dl_allocate_tib() 75 _dl_free_tib(void *tib, size_t extra) in _dl_free_tib() argument 88 free((char *)tib - tib_offset); in _dl_free_tib()
|
| D | Makefile.inc | 7 SRCS+= dlfcn_stubs.c init.c tib.c
|
| /openbsd/src/lib/libc/include/ |
| D | cancel.h | 39 #define PREP_CANCEL_POINT(tib) \ argument 40 int _cantcancel = (tib)->tib_cantcancel 42 #define ENTER_CANCEL_POINT_INNER(tib, can_cancel, delay) \ argument 44 (tib)->tib_cancel_point = (delay) ? \ 48 if (__predict_false((tib)->tib_canceled)) \ 53 #define LEAVE_CANCEL_POINT_INNER(tib, can_cancel) \ argument 55 (tib)->tib_cancel_point = 0; \ 58 if (__predict_false((tib)->tib_canceled)) \ 70 struct tib *_tib = TIB_GET(); \
|
| D | thread_private.h | 372 struct tib; 378 struct tib *tib; member 402 #define ENTER_DELAYED_CANCEL_POINT(tib, self) \ argument 404 ENTER_CANCEL_POINT_INNER(tib, 1, 1)
|
| /openbsd/src/lib/libc/locale/ |
| D | uselocale.c | 27 struct tib *tib; in uselocale() local 30 tib = TIB_GET(); in uselocale() 31 oldrunes = tib->tib_locale; in uselocale() 34 tib->tib_locale = _Utf8RuneLocale; in uselocale() 36 tib->tib_locale = &_DefaultRuneLocale; in uselocale() 38 tib->tib_locale = NULL; in uselocale()
|
| D | _CurrentRuneLocale.c | 28 struct tib *tib; in _CurrentRuneLocale() local 30 tib = TIB_GET(); in _CurrentRuneLocale() 31 return tib->tib_locale == NULL ? _GlobalRuneLocale : in _CurrentRuneLocale() 32 tib->tib_locale; in _CurrentRuneLocale()
|
| /openbsd/src/lib/libc/stdlib/ |
| D | thread_atexit.c | 30 struct tib *tib = TIB_GET(); in __cxa_thread_atexit_impl() local 40 fnp->next = tib->tib_atexit; in __cxa_thread_atexit_impl() 41 tib->tib_atexit = fnp; in __cxa_thread_atexit_impl()
|
| D | atexit.c | 129 struct tib *tib = TIB_GET(); in _thread_finalize() local 131 while (tib->tib_atexit) { in _thread_finalize() 132 struct thread_atexit_fn *fnp = tib->tib_atexit; in _thread_finalize() 133 tib->tib_atexit = fnp->next; in _thread_finalize()
|
| /openbsd/src/gnu/usr.bin/perl/os2/OS2/OS2-REXX/t/ |
| D | rx_tieydb.t | 23 tie %tib, OS2::REXX, "IB.T."; # bind associative array to REXX stem var 29 defined $tib{7} && $tib{7} =~ /^\d+$/ ? print "ok 7\n" 30 : print "not ok 7\n# tib\n"; 32 ", thread ordinal is $tib{7}\n";
|
| /openbsd/src/lib/libc/hidden/ |
| D | tib.h | 21 #include_next <tib.h> 30 struct tib *_static_tls_init(char *_base, void *_thread);
|
| /openbsd/src/gnu/llvm/compiler-rt/lib/asan/ |
| D | asan_win.cpp | 385 NT_TIB *tib = (NT_TIB *)NtCurrentTeb(); in asan_thread_exit() local 386 uptr stackSize = (uptr)tib->StackBase - (uptr)tib->StackLimit; in asan_thread_exit() 387 __asan_unpoison_memory_region(tib->StackLimit, stackSize); in asan_thread_exit()
|
| /openbsd/src/gnu/usr.bin/perl/cpan/Unicode-Collate/t/ |
| D | contract.t | 258 my $tib = Unicode::Collate->new( 264 ok($tib->cmp($a1, $b1), $long ? 0 : -1); 265 ok($tib->cmp($a2, $b2), $long ? 1 : 0); 267 $tib->change(long_contraction => 0); 268 ok($tib->cmp($a1, $b1), -1); 269 ok($tib->cmp($a2, $b2), 0); 271 $tib->change(long_contraction => 1); 272 ok($tib->cmp($a1, $b1), 0); 273 ok($tib->cmp($a2, $b2), 1);
|
| /openbsd/src/gnu/usr.bin/perl/os2/ |
| D | os2.c | 660 TIB *tib; in my_type() local 664 if (CheckOSError(DosGetInfoBlocks(&tib, &pib))) in my_type() 674 TIB *tib; in my_type_set() local 679 if (CheckOSError(DosGetInfoBlocks(&tib, &pib))) in my_type_set() 2489 PTIB tib; in Perl_Register_MQ() local 2492 DosGetInfoBlocks(&tib, &pib); in Perl_Register_MQ() 2578 PTIB tib; in Perl_Deregister_MQ() local 2580 DosGetInfoBlocks(&tib, &pib); in Perl_Deregister_MQ() 2663 PTIB tib; in async_mssleep() local 2679 if (CheckOSError(DosGetInfoBlocks(&tib, &pib))) in async_mssleep() [all …]
|