Lines Matching refs:g

74 	struct nlm_globals *g;  in lm_zone_init()  local
76 g = kmem_zalloc(sizeof (*g), KM_SLEEP); in lm_zone_init()
78 avl_create(&g->nlm_hosts_tree, nlm_host_cmp, in lm_zone_init()
82 g->nlm_hosts_hash = mod_hash_create_idhash("nlm_host_by_sysid", in lm_zone_init()
85 TAILQ_INIT(&g->nlm_idle_hosts); in lm_zone_init()
86 TAILQ_INIT(&g->nlm_slocks); in lm_zone_init()
88 mutex_init(&g->lock, NULL, MUTEX_DEFAULT, NULL); in lm_zone_init()
89 cv_init(&g->nlm_gc_sched_cv, NULL, CV_DEFAULT, NULL); in lm_zone_init()
90 cv_init(&g->nlm_gc_finish_cv, NULL, CV_DEFAULT, NULL); in lm_zone_init()
91 mutex_init(&g->clean_lock, NULL, MUTEX_DEFAULT, NULL); in lm_zone_init()
93 g->lockd_pid = 0; in lm_zone_init()
94 g->run_status = NLM_ST_DOWN; in lm_zone_init()
96 nlm_globals_register(g); in lm_zone_init()
97 return (g); in lm_zone_init()
104 struct nlm_globals *g = data; in lm_zone_fini() local
106 ASSERT(avl_is_empty(&g->nlm_hosts_tree)); in lm_zone_fini()
107 avl_destroy(&g->nlm_hosts_tree); in lm_zone_fini()
108 mod_hash_destroy_idhash(g->nlm_hosts_hash); in lm_zone_fini()
110 ASSERT(g->nlm_gc_thread == NULL); in lm_zone_fini()
111 mutex_destroy(&g->lock); in lm_zone_fini()
112 cv_destroy(&g->nlm_gc_sched_cv); in lm_zone_fini()
113 cv_destroy(&g->nlm_gc_finish_cv); in lm_zone_fini()
114 mutex_destroy(&g->clean_lock); in lm_zone_fini()
116 nlm_globals_unregister(g); in lm_zone_fini()
117 kmem_free(g, sizeof (*g)); in lm_zone_fini()
183 struct nlm_globals *g; in lm_svc() local
188 g = zone_getspecific(nlm_zone_key, curzone); in lm_svc()
251 mutex_enter(&g->lock); in lm_svc()
256 if (g->run_status == NLM_ST_STOPPING) { in lm_svc()
266 if (g->run_status == NLM_ST_DOWN) { in lm_svc()
267 g->run_status = NLM_ST_STARTING; in lm_svc()
268 g->lockd_pid = curproc->p_pid; in lm_svc()
271 g->cn_idle_tmo = args->timout; in lm_svc()
272 g->grace_period = args->grace; in lm_svc()
273 g->retrans_tmo = args->retransmittimeout; in lm_svc()
281 mutex_exit(&g->lock); in lm_svc()
282 err = nlm_svc_starting(g, fp, netid, &knc); in lm_svc()
283 mutex_enter(&g->lock); in lm_svc()
289 if (g->run_status != NLM_ST_UP) { in lm_svc()
293 if (g->lockd_pid != curproc->p_pid) { in lm_svc()
303 mutex_exit(&g->lock); in lm_svc()
318 struct nlm_globals *g; in lm_shutdown() local
323 g = zone_getspecific(nlm_zone_key, curzone); in lm_shutdown()
325 mutex_enter(&g->lock); in lm_shutdown()
326 if (g->run_status != NLM_ST_UP) { in lm_shutdown()
327 mutex_exit(&g->lock); in lm_shutdown()
331 g->run_status = NLM_ST_STOPPING; in lm_shutdown()
332 pid = g->lockd_pid; in lm_shutdown()
333 mutex_exit(&g->lock); in lm_shutdown()
334 nlm_svc_stopping(g); in lm_shutdown()
429 struct nlm_globals *g; in lm_get_sysid() local
438 g = zone_getspecific(nlm_zone_key, curzone); in lm_get_sysid()
440 hostp = nlm_host_findcreate(g, name, netid, addr); in lm_get_sysid()
453 struct nlm_globals *g; in lm_rel_sysid() local
455 g = zone_getspecific(nlm_zone_key, curzone); in lm_rel_sysid()
456 nlm_host_release(g, (struct nlm_host *)sysid); in lm_rel_sysid()