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

Function giant_fdopen

freebsd/kern/kern_conf.c:366–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366static int
367giant_fdopen(struct cdev *dev, int oflags, struct thread *td, struct file *fp)
368{
369 struct cdevsw *dsw;
370 int ref, retval;
371
372 dsw = dev_refthread(dev, &ref);
373 if (dsw == NULL)
374 return (ENXIO);
375 mtx_lock(&Giant);
376 retval = dsw->d_gianttrick->d_fdopen(dev, oflags, td, fp);
377 mtx_unlock(&Giant);
378 dev_relthread(dev, ref);
379 return (retval);
380}
381
382static int
383giant_close(struct cdev *dev, int fflag, int devtype, struct thread *td)

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