Lines Matching +full:valid +full:- +full:wakeup +full:- +full:mask

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
15 * 3. Neither the name of the author nor the names of any co-contributors
43 #include "un-namespace.h"
83 * Make sure the address is always valid by holding the library, in thread_uw_init()
146 cfa >= (uintptr_t)curthread->unwind_stackend) { in thread_unwind_stop()
150 while ((cur = curthread->cleanup) != NULL && in thread_unwind_stop()
156 /* Tell libc that it should call non-trivial TLS dtors. */ in thread_unwind_stop()
170 curthread->ex.exception_class = 0; in thread_unwind()
171 curthread->ex.exception_cleanup = thread_unwind_cleanup; in thread_unwind()
172 _Unwind_ForcedUnwind(&curthread->ex, thread_unwind_stop, NULL); in thread_unwind()
210 _pthread_exit_mask(void *status, sigset_t *mask) argument
215 if (curthread->cancelling)
221 curthread->cancelling = 1;
222 curthread->no_cancel = 1;
223 curthread->cancel_async = 0;
224 curthread->cancel_point = 0;
225 if (mask != NULL)
226 __sys_sigprocmask(SIG_SETMASK, mask, NULL);
227 if (curthread->unblock_sigcancel) {
230 curthread->unblock_sigcancel = 0;
233 __sys_sigprocmask(SIG_UNBLOCK, mask, NULL);
237 curthread->ret = status;
246 if (curthread->unwind_disabled) {
258 while (curthread->cleanup != NULL) {
267 while (curthread->cleanup != NULL) {
281 free(curthread->name);
282 curthread->name = NULL;
285 if (curthread->specific != NULL) {
286 /* Run the thread-specific data destructors: */
293 if (atomic_fetchadd_int(&_thread_active_threads, -1) == 1) {
302 curthread->state = PS_DEAD;
303 if (curthread->flags & THR_FLAGS_NEED_SUSPEND) {
304 curthread->cycle++;
305 _thr_umtx_wake(&curthread->cycle, INT_MAX, 0);
307 if (!curthread->force_exit && SHOULD_REPORT_EVENT(curthread, TD_DEATH))
313 curthread->refcount--;
321 * Kernel will do wakeup at the address, so joiner thread
324 thr_exit(&curthread->tid);