Lines Matching defs:mgr
75 struct hl_ctx_mgr *mgr = &hpriv->ctx_mgr;
85 mutex_lock(&mgr->ctx_lock);
86 rc = idr_alloc(&mgr->ctx_handles, ctx, 1, 0, GFP_KERNEL);
87 mutex_unlock(&mgr->ctx_lock);
112 mutex_lock(&mgr->ctx_lock);
113 idr_remove(&mgr->ctx_handles, ctx->handle);
114 mutex_unlock(&mgr->ctx_lock);
238 * @mgr: pointer to context manager structure
243 void hl_ctx_mgr_init(struct hl_ctx_mgr *mgr)
245 mutex_init(&mgr->ctx_lock);
246 idr_init(&mgr->ctx_handles);
253 * @mgr: pointer to context manager structure
258 void hl_ctx_mgr_fini(struct hl_device *hdev, struct hl_ctx_mgr *mgr)
264 idp = &mgr->ctx_handles;
269 idr_destroy(&mgr->ctx_handles);
270 mutex_destroy(&mgr->ctx_lock);