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

Function giant_mmap

freebsd/kern/kern_conf.c:497–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495}
496
497static int
498giant_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot,
499 vm_memattr_t *memattr)
500{
501 struct cdevsw *dsw;
502 int ref, retval;
503
504 dsw = dev_refthread(dev, &ref);
505 if (dsw == NULL)
506 return (ENXIO);
507 mtx_lock(&Giant);
508 retval = dsw->d_gianttrick->d_mmap(dev, offset, paddr, nprot,
509 memattr);
510 mtx_unlock(&Giant);
511 dev_relthread(dev, ref);
512 return (retval);
513}
514
515static int
516giant_mmap_single(struct cdev *dev, vm_ooffset_t *offset, vm_size_t size,

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