Lines Matching refs:ops
80 kobj_class_compile_common(kobj_class_t cls, kobj_ops_t ops)
88 if (cls->ops)
100 * Then initialise the ops table.
103 ops->cache[i] = &null_method;
104 ops->cls = cls;
105 cls->ops = ops;
111 kobj_ops_t ops;
116 * Allocate space for the compiled ops table.
118 ops = bsd_malloc(sizeof(struct kobj_ops), M_KOBJ, M_NOWAIT);
119 if (!ops)
129 if (cls->ops) {
131 bsd_free(ops, M_KOBJ);
135 kobj_class_compile_common(cls, ops);
140 kobj_class_compile_static(kobj_class_t cls, kobj_ops_t ops)
147 * Increment refs to make sure that the ops table is not freed.
150 kobj_class_compile_common(cls, ops);
209 void* ops = NULL;
227 ops = cls->ops;
228 cls->ops = NULL;
233 if (ops)
234 bsd_free(ops, M_KOBJ);
259 obj->ops = cls->ops;
273 if (!cls->ops) {
302 kobj_class_t cls = obj->ops->cls;
319 obj->ops = NULL;