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

Function giant_open

freebsd/kern/kern_conf.c:350–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348#define no_dump (dumper_t *)enodev
349
350static int
351giant_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
352{
353 struct cdevsw *dsw;
354 int ref, retval;
355
356 dsw = dev_refthread(dev, &ref);
357 if (dsw == NULL)
358 return (ENXIO);
359 mtx_lock(&Giant);
360 retval = dsw->d_gianttrick->d_open(dev, oflags, devtype, td);
361 mtx_unlock(&Giant);
362 dev_relthread(dev, ref);
363 return (retval);
364}
365
366static int
367giant_fdopen(struct cdev *dev, int oflags, struct thread *td, struct file *fp)

Callers

nothing calls this directly

Calls 4

dev_refthreadFunction · 0.85
dev_relthreadFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected