/* We need only a few variables. */ #define manager_thread __pthread_manager_threadp pthread_descr __pthread_manager_threadp attribute_hidden; #else /* Descriptor of the initial thread */ struct _pthread_descr_struct __pthread_initial_thread = { .p_header.data.self = &__pthread_initial_thread, .p_nextlive = &__pthread_initial_thread, .p_prevlive = &__pthread_initial_thread, .p_tid = PTHREAD_THREADS_MAX, .p_lock = &__pthread_handles[0].h_lock, .p_start_args = PTHREAD_START_ARGS_INITIALIZER(NULL), #if !(USE_TLS && HAVE___THREAD) .p_errnop = &_errno, .p_h_errnop = &_h_errno, .p_resp = &_res, #endif .p_userstack = 1, .p_resume_count = __ATOMIC_INITIALIZER, .p_alloca_cutoff = __MAX_ALLOCA_CUTOFF }; /* Descriptor of the manager thread; none of this is used but the error variables, the p_pid and p_priority fields, and the address for identification. */ #define manager_thread (&__pthread_manager_thread)
0, /* char p_detached */ 0, /* char p_exited */ NULL, /* void * p_retval */ 0, /* int p_retval */ NULL, /* pthread_descr p_joining */ NULL, /* struct _pthread_cleanup_buffer * p_cleanup */ 0, /* char p_cancelstate */ 0, /* char p_canceltype */ 0, /* char p_canceled */ &__pthread_initial_thread.p_reent, /* struct _reent *p_reentp */ _REENT_INIT(__pthread_initial_thread.p_reent), /* struct _reent p_reent */ NULL, /* int *p_h_errnop */ 0, /* int p_h_errno */ NULL, /* char * p_in_sighandler */ 0, /* char p_sigwaiting */ PTHREAD_START_ARGS_INITIALIZER(NULL), /* struct pthread_start_args p_start_args */ {NULL}, /* void ** p_specific[PTHREAD_KEY_1STLEVEL_SIZE] */ {NULL}, /* void * p_libc_specific[_LIBC_TSD_KEY_N] */ 1, /* int p_userstack */ NULL, /* void * p_guardaddr */ 0, /* size_t p_guardsize */ 0, /* Always index 0 */ 0, /* int p_report_events */ {{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */ __ATOMIC_INITIALIZER, /* struct pthread_atomic p_resume_count */ 0, /* char p_woken_by_cancel */ 0, /* char p_condvar_avail */ 0, /* char p_sem_avail */ NULL, /* struct pthread_extricate_if *p_extricate */ NULL, /* pthread_readlock_info *p_readlock_list; */