Lines Matching refs:context
57 int __ibv_close_device(struct ibv_context *context);
58 int __ibv_get_async_event(struct ibv_context *context,
135 void verbs_init_cq(struct ibv_cq *cq, struct ibv_context *context,
139 cq->context = context;
143 pthread_mutex_lock(&context->mutex);
145 pthread_mutex_unlock(&context->mutex);
156 __lib_ibv_create_cq_ex(struct ibv_context *context,
159 struct verbs_context *vctx = verbs_get_ctx(context);
167 cq = vctx->priv->create_cq_ex(context, cq_attr);
170 verbs_init_cq(ibv_cq_ex_to_cq(cq), context,
181 struct ibv_context *context;
198 context = verbs_device->ops->alloc_context(device, cmd_fd);
199 if (!context)
204 /* Library now allocates the context */
220 context_ex->context.abi_compat = __VERBS_ABI_IS_EXTENDED;
223 context = &context_ex->context;
224 ret = verbs_device->ops->init_context(verbs_device, context, cmd_fd);
248 context->device = device;
249 context->cmd_fd = cmd_fd;
250 pthread_mutex_init(&context->mutex, NULL);
252 return context;
263 int __ibv_close_device(struct ibv_context *context)
265 int async_fd = context->async_fd;
266 int cmd_fd = context->cmd_fd;
269 struct verbs_device *verbs_device = verbs_get_device(context->device);
271 context_ex = verbs_get_ctx(context);
273 verbs_device->ops->uninit_context(verbs_device, context);
277 verbs_device->ops->free_context(context);
289 int __ibv_get_async_event(struct ibv_context *context,
294 if (read(context->async_fd, &ev, sizeof ev) != sizeof ev)
328 if (context->ops.async_event)
329 context->ops.async_event(event);