Lines Matching refs:gnctx

108 	nscd_getent_ctx_t	*gnctx;
115 size = sizeof (*gnctx);
122 gnctx = (nscd_getent_ctx_t *)*(db_entry->data_array);
123 gnctx->ptr = ptr;
124 gnctx->cookie_num = cookie_num;
157 nscd_getent_ctx_t *gnctx;
159 gnctx = (nscd_getent_ctx_t *)*(db_entry->data_array);
162 gnctx->ptr, gnctx->cookie_num, gnctx->to_delete);
169 if (gnctx->to_delete == 0 && gnctx->cookie_num == cookie_num) {
170 ret = gnctx->ptr;
171 (void) mutex_lock(&gnctx->ptr->getent_mutex);
176 (void) mutex_unlock(&gnctx->ptr->getent_mutex);
249 nscd_getent_ctx_t *gnctx;
268 gnctx = (nscd_getent_ctx_t *)*(db_entry->data_array);
269 if (gnctx->ptr == ptr && gnctx->cookie_num == cookie_num) {
285 nscd_getent_context_t *gnctx)
291 (me, "getent context %p\n", gnctx);
293 _nscd_put_nsw_state(gnctx->nsw_state);
295 if (gnctx->base != NULL) {
297 _nscd_release((nscd_acc_data_t *)gnctx->base);
298 gnctx->base = NULL;
301 _nscd_del_getent_ctx(gnctx, gnctx->cookie_num);
302 free(gnctx);
356 nscd_getent_context_t *gnctx;
360 gnctx = calloc(1, sizeof (nscd_getent_context_t));
361 if (gnctx == NULL)
365 (me, "getent context allocated %p\n", gnctx);
368 gnctx->dbi = params->dbi;
369 gnctx->cookie_num = _nscd_get_cookie_num();
370 gnctx->pid = -1;
371 (void) mutex_init(&gnctx->getent_mutex, USYNC_THREAD, NULL);
374 free(gnctx);
377 gnctx->nsw_state = (nscd_nsw_state_t *)db_root.s;
379 gnctx->nsw_state->getent = 1;
382 (me, "got nsw_state %p\n", gnctx->nsw_state);
384 return (gnctx);
492 nscd_getent_context_t *gnctx)
498 base = gnctx->base;
502 _nscd_free_getent_ctx(gnctx);
507 gnctx->next = base->first;
508 base->first = gnctx;
510 base->first = gnctx;
514 (me, "putting back nsw state %p\n", gnctx->nsw_state);
517 if (gnctx->nsw_state != NULL) {
518 gnctx->nsw_state->getent = 0;
519 _nscd_put_nsw_state(gnctx->nsw_state);
520 gnctx->nsw_state = NULL;
523 gnctx->aborted = 0;
524 gnctx->in_use = 0;
525 gnctx->thr_id = (thread_t)-1;
526 _nscd_del_getent_ctx(gnctx, gnctx->cookie_num);
530 gnctx, gnctx->cookie_num);
532 gnctx->seq_num = 0;
533 gnctx->cookie_num = 0;
534 gnctx->pid = -1;
535 gnctx->thr_id = (thread_t)-1;
536 gnctx->n_src = 0;
537 gnctx->be = NULL;
541 gnctx->base = NULL;