MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kobj_init1

Function kobj_init1

freebsd/kern/subr_kobj.c:271–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static int
272kobj_init1(kobj_t obj, kobj_class_t cls, int mflags)
273{
274 int error;
275
276 KOBJ_LOCK();
277 while (cls->ops == NULL) {
278 /*
279 * kobj_class_compile doesn't want the lock held
280 * because of the call to malloc - we drop the lock
281 * and re-try.
282 */
283 KOBJ_UNLOCK();
284 error = kobj_class_compile1(cls, mflags);
285 if (error != 0)
286 return (error);
287 KOBJ_LOCK();
288 }
289 kobj_init_common(obj, cls);
290 KOBJ_UNLOCK();
291 return (0);
292}
293
294kobj_t
295kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags)

Callers 2

kobj_createFunction · 0.85
kobj_initFunction · 0.85

Calls 2

kobj_class_compile1Function · 0.85
kobj_init_commonFunction · 0.85

Tested by

no test coverage detected