Lines Matching +full:wake +full:- +full:up

64 						/* up */
103 config_cookie.mgr_pid = cookie->mgr_pid; in chg_config_cookie_set()
104 config_cookie.seq_num = cookie->seq_num; in chg_config_cookie_set()
110 if (c1->mgr_pid == c2->mgr_pid && c1->seq_num == c2->seq_num) in chg_cookie_equal()
134 wl->pid = pid; in waiting_list_add()
135 wl->tid = tid; in waiting_list_add()
137 if (info->chg_w_first == NULL) { in waiting_list_add()
138 info->chg_w_first = wl; in waiting_list_add()
139 info->chg_w_last = wl; in waiting_list_add()
141 info->chg_w_last->next = wl; in waiting_list_add()
142 wl->prev = info->chg_w_last; in waiting_list_add()
143 info->chg_w_last = wl; in waiting_list_add()
157 for (wl = info->chg_w_first; wl != NULL; wl = wl->next) { in waiting_list_delete()
158 if (wl->tid == tid) { in waiting_list_delete()
159 if (wl->next == NULL) { in waiting_list_delete()
160 if (wl->prev == NULL) { in waiting_list_delete()
161 info->chg_w_first = NULL; in waiting_list_delete()
162 info->chg_w_last = NULL; in waiting_list_delete()
164 wl->prev->next = NULL; in waiting_list_delete()
165 info->chg_w_last = wl->prev; in waiting_list_delete()
168 if (wl->prev == NULL) { in waiting_list_delete()
169 wl->next->prev = NULL; in waiting_list_delete()
170 info->chg_w_first = wl->next; in waiting_list_delete()
172 wl->prev->next = wl->next; in waiting_list_delete()
173 wl->next->prev = wl->prev; in waiting_list_delete()
194 if (rc == CHG_SUCCESS && chg->chg_w_first == NULL) { in waiting_list_cleanup()
195 free(chg->chg_data); in waiting_list_cleanup()
196 chg->chg_data = NULL; in waiting_list_cleanup()
197 chg->chg_wakeup = 0; in waiting_list_cleanup()
202 * Set flag by pid so it can be cleaned up.
209 for (wl = info->chg_w_first; wl != NULL; wl = wl->next) { in waiting_list_set_cleanup()
210 if (wl->pid == pid) { in waiting_list_set_cleanup()
211 wl->cleanup = 1; in waiting_list_set_cleanup()
218 * Return: 1 - door client is dead, 0 - door client is alive
226 if (door_ucred(&uc) == -1 && errno == EINVAL) { in door_client_dead()
245 * clean up that thread and wait until the cleanup is done then proceeds to
250 * If the door call is STOP op, it creates a thread to clean up main nscd START
252 * In waiting for the change notification phase, the thread is waken up by
268 info->str = NULL; in chg_get_statusChange()
269 info->len = 0; in chg_get_statusChange()
271 if (in->ldap_u.get_change.op == NS_STATUS_CHANGE_OP_START) { in chg_get_statusChange()
280 * not cleaned up yet. in chg_get_statusChange()
282 * If it is, clean it up. in chg_get_statusChange()
305 * Wait for another thread to be cleaned up if it's alive. in chg_get_statusChange()
306 * After that this cond var is waken up. in chg_get_statusChange()
327 if (!chg_cookie_equal(&cookie, &in->ldap_u.get_change.cookie)) { in chg_get_statusChange()
336 cout->type = NS_STATUS_CHANGE_TYPE_CONFIG; in chg_get_statusChange()
337 cout->cookie = cookie; in chg_get_statusChange()
338 info->str = (char *)cout; in chg_get_statusChange()
339 info->len = len; in chg_get_statusChange()
350 if (wl->cleanup || in chg_get_statusChange()
359 if (!return_now && !wl->cleanup && in chg_get_statusChange()
362 if ((info->str = malloc( in chg_get_statusChange()
366 (void) memcpy(info->str, in chg_get_statusChange()
369 info->len = chg.chg_data_size; in chg_get_statusChange()
390 } else if (in->ldap_u.get_change.op == NS_STATUS_CHANGE_OP_STOP) { in chg_get_statusChange()
406 * then send broadcast to wake up the chg_get_statusChange() threads.
413 cout->cookie = chg_config_cookie_get(); in chg_notify_statusChange()
425 if (cout->type == NS_STATUS_CHANGE_TYPE_CONFIG) in chg_notify_statusChange()
429 chg.chg_data_size = sizeof (ldap_get_change_out_t) - in chg_notify_statusChange()
430 sizeof (int) + cout->data_size; in chg_notify_statusChange()
473 if (strcmp(new_out->config_str, cur_out->config_str) != 0) { in chg_test_config_change()
497 cout->type = NS_STATUS_CHANGE_TYPE_CONFIG; in chg_test_config_change()
499 * cout->cookie is set by in chg_test_config_change()
512 * Wake up chg_get_statusChange() threads to clean up the threads
519 (void) mutex_lock(&chg->chg_lock); in cleanup_threads()
523 * wake up threads without setting chg.chg_wakeup. in cleanup_threads()
526 (void) cond_broadcast(&chg->chg_cv); in cleanup_threads()
527 (void) mutex_unlock(&chg->chg_lock); in cleanup_threads()
549 type = op->type; in chg_cleanup_waiting_threads()
550 pid = op->pid; in chg_cleanup_waiting_threads()
569 * as to be clean up. If pid is 0, no marking and just clean up all.
579 op->pid = pid; in cleanup_thread_by_pid()
580 /* clean up all if pid is 0 */ in cleanup_thread_by_pid()
582 op->type = CLEANUP_ALL; in cleanup_thread_by_pid()
584 op->type = CLEANUP_BY_PID; in cleanup_thread_by_pid()
596 * Return: 0 - Can't find the process or it's not nscd
597 * 1 - psinfo found