Lines Matching refs:new

39 initialize_pthread (struct __pthread *new)  in initialize_pthread()  argument
43 err = __pthread_init_specific (new); in initialize_pthread()
47 new->nr_refs = 1; in initialize_pthread()
48 new->cancel_lock = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER; in initialize_pthread()
49 new->cancel_hook = NULL; in initialize_pthread()
50 new->cancel_hook_arg = NULL; in initialize_pthread()
51 new->cancel_state = PTHREAD_CANCEL_ENABLE; in initialize_pthread()
52 new->cancel_type = PTHREAD_CANCEL_DEFERRED; in initialize_pthread()
53 new->cancel_pending = 0; in initialize_pthread()
55 new->state_lock = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER; in initialize_pthread()
56 new->state_cond = (pthread_cond_t) PTHREAD_COND_INITIALIZER; in initialize_pthread()
58 memset (&new->res_state, '\0', sizeof (new->res_state)); in initialize_pthread()
60 new->tcb = NULL; in initialize_pthread()
62 new->next = 0; in initialize_pthread()
63 new->prevp = 0; in initialize_pthread()
76 struct __pthread *new; in __pthread_alloc() local
83 for (new = __pthread_free_threads; new; new = new->next) in __pthread_alloc()
90 if (new->state == PTHREAD_TERMINATED) in __pthread_alloc()
92 __pthread_dequeue (new); in __pthread_alloc()
98 if (new) in __pthread_alloc()
100 if (new->tcb) in __pthread_alloc()
103 _dl_deallocate_tls (new->tcb, 1); in __pthread_alloc()
106 err = initialize_pthread (new); in __pthread_alloc()
108 *pthread = new; in __pthread_alloc()
113 new = malloc (sizeof (struct __pthread)); in __pthread_alloc()
114 if (new == NULL) in __pthread_alloc()
117 err = initialize_pthread (new); in __pthread_alloc()
120 free (new); in __pthread_alloc()
131 new->thread = 1 + GL (dl_pthread_num_threads)++; in __pthread_alloc()
132 GL (dl_pthread_threads)[new->thread - 1] = NULL; in __pthread_alloc()
136 *pthread = new; in __pthread_alloc()
145 free (new); in __pthread_alloc()
163 free (new); in __pthread_alloc()
193 new->thread = 1 + GL (dl_pthread_num_threads)++; in __pthread_alloc()
194 GL (dl_pthread_threads)[new->thread - 1] = NULL; in __pthread_alloc()
200 *pthread = new; in __pthread_alloc()